Difference between revisions of "OLEDDisplay"
Line 51: | Line 51: | ||
'''<nowiki>http://<ESP IP address>/control?cmd=oled,<row>,<col>,<text></nowiki>''' | '''<nowiki>http://<ESP IP address>/control?cmd=oled,<row>,<col>,<text></nowiki>''' | ||
− | It is also possible to switch on or off the OLED or to clear the display. | + | It is also possible to switch on or off the OLED or to clear the display. During the off state, the content will be updated according to the latest values or states. |
− | During the off state, the content will be updated according to the latest values or states. | + | |
'''<nowiki>http://<ESP IP address>/control?cmd=oledcmd,on</nowiki>''' | '''<nowiki>http://<ESP IP address>/control?cmd=oledcmd,on</nowiki>''' | ||
+ | |||
'''<nowiki>http://<ESP IP address>/control?cmd=oledcmd,off</nowiki>''' | '''<nowiki>http://<ESP IP address>/control?cmd=oledcmd,off</nowiki>''' | ||
+ | |||
'''<nowiki>http://<ESP IP address>/control?cmd=oledcmd,clear</nowiki>''' | '''<nowiki>http://<ESP IP address>/control?cmd=oledcmd,clear</nowiki>''' |
Revision as of 19:11, 23 December 2015
Contents
Introduction
The ESP8266 module can be used to control an I2C OLED SSD1306 Display. Mainly to display sensor values locally.
We currently only support text messages, 8 lines of 16 characters.
Hardware
As you can see, connections are easy with this display. The board has only 4 wires:
Connect the OLED Display to the I2C interface. This display works with 3V3 and can be connected directly to the ESP module.
Connections
LCD ESP-01 GND GND VCC VCC SDA GPIO 0 SCL GPIO 2
Software
Custom sketch
ESP Easy
Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "Display - OLED 1306" from the dropdown box.
Enter template texts into lines 1 to 8. Plain text will be shown on the display exactly as entered. If you want to show a value, enclose <task name> and <value name> between brackets, separated by a hashtag.
So if you have a dallas sensor running, with taskname "Dallas", to get the temperature value, use this:
[Dallas#Temperature]
Check this sample on how to get it done:
(The IDX field will be stuffed with '1', because it's needs a value. But nothing will be send with this device)
HTTP control command
You can also control the LCD Display by remote http commands send from your Home Automation Controller or any other device that can send http get requests.
Command format:
http://<ESP IP address>/control?cmd=oled,<row>,<col>,<text>
It is also possible to switch on or off the OLED or to clear the display. During the off state, the content will be updated according to the latest values or states.
http://<ESP IP address>/control?cmd=oledcmd,on
http://<ESP IP address>/control?cmd=oledcmd,off
http://<ESP IP address>/control?cmd=oledcmd,clear