Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Sunspot
#16044 Many thanks - new to me.

I have both UDP and html tested OK now - but MQTT sounds to be the real answer for Internet of Things

Google shows how popular this is - eg https://www.youtube.com/watch?v=exMm-fmU5ck

I see the Linux end - but not sure how to set up the ESP8266
Are there any examples?

I have both UDP and html tested OK now - but MQTT sounds to be the real answer for Internet of Things
User avatar
By j0hncc
#16150 I have used Sming to implement my garage door sensor/controller recently. Eclipse is a lovely IDE.
https://github.com/j0hncc/Garage8266/bl ... cation.cpp

The garage events and other things are posted to my mqtt broker which was easily bridged (publish-only) to test.mosquitto.org. You can see it by going to client at http://www.hivemq.com/demos/websocket-client/, connect to broker test.mosquitto.org port 8080, and subscribe to pv/#

Good luck!
John
User avatar
By Sunspot
#16927 I am now using code based on the simple web server examples and can send static data to my browser.
That "runs for ever" OK.
I tested the Onewire example to get a working thermometer
That also "runs for ever" OK.
I joined the two together and sent real data to the browser
BUT
after a while the heap overflows - I think.
I see
"No heap available, failed to malloc 192"
I have put the combined program and more details in my project notes here (bottom of page) -
http://www.sunspot.co.uk/Projects/Ardui ... P8266.html
I am not a C expert - I have Googled but do not see what has gone wrong.
- help much appreciated!

Is there a good working example of sending sensor data to a browser from I/O, Onewire and/or i2c ?