So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By HyperDevil
#63193 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.
User avatar
By Saad Syed
#64120 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.