-->
Page 1 of 1

Newbie with ESP-14 STM8S003

PostPosted: Wed Mar 01, 2017 1:26 pm
by HyperDevil
Hi everyone,

I am a newbie to this field, and i am trying to make a remote temperature/humidity/light/pressure device.
So this one looked very good and i bought it, link: http://www.ebay.com/itm/BH1750-ESP8266-WIFI-Module-HDC1080-Temperature-Humidity-BMP280-Pressure-Sensor-/191981014679?hash=item2cb2f5ce97:g:7XcAAOSwAuZX6gzm

I have an Arduino Uno for small testing and such and also a FTDI1232 (which was required to flash this device as i have understood)

I have come so far that i got the RS232 working and got it connected to my wifi network.
Now the question.
How do i program the chip to retrieve that data from the 3 sensors onboard?
I have not gotten any documentation, so i am working blind, but i am probably not the only one that bought it? (i hope)

I hope one of you can help me get on track on programming this thing, i tried the ESP8266 board in Arduino IDE, but i cannot seem to upload any code. (espcomm_upload_mem failed)
Also the pin layout on that board does not match the PIN documentation on the ESP-14.

Please help.

Re: Newbie with ESP-14 STM8S003

PostPosted: Sat Mar 04, 2017 12:33 pm
by HyperDevil
*bump*

i have in the meantime contacted the seller, he has no information..

Re: Newbie with ESP-14 STM8S003

PostPosted: Sun Mar 05, 2017 4:20 am
by jeffas
For uploading code, have you connected GIO0 to GND? You need to do that to tell the ESP to accept new code.

Re: Newbie with ESP-14 STM8S003

PostPosted: Thu Mar 23, 2017 1:55 am
by Saad Syed
I was able to use STLink to connect to STM8S003 and noticed AT commands in the dump. I noticed it was sending AT commands to ESP14 to:
1. set it up as an access point
2. bind to port 6666
3. send packet to client with values from the individual sensors.

Yes, all via AT commands!

So I used serial to setup Wifi on ESP14:

AT+CWMODE=3
AT+CWJAP="YourAP","YourPassword"

You've to set CWMODE 3 to ensure that STM8S003 does not get an error when it tries to setup ESP14 as an AP. CWMODE supports both client and AP mode.

STM8S003 is pre-programmed to read and push metrics from individual sensors to the client.

I disconnected serial, and upon reset used "curl <ip>:port" to get a dump of data.

It however stopped working after a number of iterations. This happened on both samples of the sensor. Its quite odd. I'm giving up on it, but I'm open to try ideas.

Let me know if you are more lucky.