- Sat Apr 11, 2015 1:24 pm
#14202
As far as working examples of I2C displays there is a working ESP-Arduino I2C display example here -
http://www.esp8266.com/viewtopic.php?f=29&t=2289I modified that example a bit and added in code from the mqtt pub/sub examples and made a mqtt message board.
I used a Sainsmart 4x20 I2C LCD display, and my program looks for a mqtt message with topic
"home/msgBoard".
The payload published to show on the message board is comma-delimited, what's between the comma's goes to either line 2,3, and or 4 of the display.
So for example to watch my furnace I have a mqtt message like this:
topic: home/msgBoard
payload: "Furnace,Temp = 95, Time = 12:00"
I get the weather (from NOAA and a nearby airport and from the DarkSky api) format it up in Node Red and shoot it out to my little message board every 30 minutes. I can also request it to send me the weather info any time by sending another mqtt message (topic: getWeather).
I find having Node Red do all the fancy listening and formatting and sending works very well, lets me keep the little displays and sensors fairly simple.
Here's the weather -
IMG_2167.JPG
and
IMG_2166.JPG
So - both using I2C LCD displays and mqtt is working fine in the ESP-Arduino world.
As you can see I need to fix my program to deal with lines longer than 20 chars...
Here's my example:
mqttMessageCenterExample.zip
I didn't use the 128x96 I2C displays because I made a similar project to this one using nodemcu Lua and I find that my old eyes have too hard a time with those little displays.
Maybe I'm wrong to assume, but I would think that those displays would work as well as the one I used here.
Here's the comparison of the two displays -
IMG_2171.JPG
And as far as the original topic of this post - I too see every I2C address as present with the i2C scanner, but nevertheless I2C displays do work fine.
Now if only I could get the I2C TSL2561 luminosity sensor to work...
You do not have the required permissions to view the files attached to this post.