In this tutorial we will use NodeMCU Mini, OLED Lcd, and Visuino to display live NEWS every few seconds from the internet on LCD. Watch a demonstration video.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Will Need
- NodeMCU Mini
- OLED Lcd
- Jumper wires
- Visuino program: Download Visuino
Step 2: The Circuit
- Connect GND from NodeMCU to breadboard pin (gnd)
- Connect 5V pin from NodeMCU to breadboard pin (positive)
- Connect pin 0 (SCL) from NodeMCU to OLED LCD pin (SCL)
- Connect pin 1 (SDA) from NodeMCU to OLED LCD pin (SDA)
- Connect OLED LCD pin (VCC) to breadboard pin (positive)
- Connect OLED LCD pin (GND) to breadboard pin (GND)
Step 3: Start Visuino, and Select the NodeMCU ESP-12
To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program ESP 8266!
The Visuino also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino
When the dialog appears, select "NodeMCU ESP-12" as shown on Picture 2
Step 4: WiFi Setup
- Select NodeMCU ESP-12 and in the editor Modules>WiFi>Access Points, click on [...] button, so that "Access points " window will open.
In this editor drag the WiFi access point to the left side.
- Under "SSID" put the name of your WiFi Network
- Under "Password" put the access password for your WiFi network
Close the "Access points" window
On the left in editor select Modules>Wifi>Sockets, click on [...] button, so that "Sockets" window will open
Drag the TCP Client from right to the left side
Under Properties window set port: 80
Step 5: In Visuino Add Components
- Add CharToText1 component
Set Max Length 1000
- Add Display OLED I2C
Double click and in the window drag Text Field to the left
- Add Formatted Text
put this under "text" value:
GET http://feeds.reuters.com/Reuters/worldNews HTTP/1.1
- Add Replace Text (ReplaceText1 )
- set "From Value":
- set "ToValue" to empty
- Add Replace Text (ReplaceText2 )
- (see the picture) set "From Value":TAB TAB
- set "ToValue" to empty
- Add Text Length (TextLength2)
- Add ContainsText (ContainsText1)
- Set "text" value: TAB TAB </ol><p><strong>(see the picture)</strong></p><ul> <li>Add Remember Text <li>Add logic AND <li>Add AddValue</ul><ol> <li>set Value:1</ol><ul> <li>Add CompareValue (CompareValue1)</ul><ol> <li>set "comparetype": ctSmallerOrEqual <li>set "value":2</ol><ul> <li>Add CompareValue (CompareValue3)</ul><ol> <li>set "comparetype": ctBigger <li> <p>set "value":3</p></ol></ol>
Step 6: In Visuino: Connecting Components
- Connect NodeMCU ESP-12 > Modules WiFi Sockets TCP Client1> Pin[Out] to CharToText1 pin [In]
- Connect CharToText1 pin [out] to ReplaceText1 pin[in]
- Connect ReplaceText1 pin[out] to TextLength2 pin[in] and ContainsText1 pin [in] and to RememberText1 pin [in]
- Connect TextLength2 pin [out] to CompareValue3 pin [in]
- Connect CompareValue3 pin [out] to And1 pin
- Connect ContainsText1 pin[out] to And1 pin
- Connect And1 pin [out] to AddValue1 pin[in]
- Connect AddValue1 pin[out] to CompareValue1 pin[in]
- Connect CompareValue1 pin[out] to RememberText1 pin [remember] and pin[recall]
- Connect RememberText1 pin [out] to ReplaceText2 pin [in]
- Connect ReplaceText2 pin[out] to NodeMCU ESP-12 serial0 pin[in] and to DisplayOLED1 elements text field pin[in]
- Connect DisplayOLED1 pin [out] to NodeMCU ESP-12 I2C pin [in]
Step 7: Generate, Compile, and Upload the Arduino Code
In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)
Step 8: Play
If you power the NodeMCU module, the OLED Lcd will start showing the Latest World News.
Congratulations! You have completed your Live News project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: Download link