In this tutorial we will use NodeMCU Mini, OLED Lcd, and Visuino to display live internet time from NIST Server on Lcd. Watch a demonstration video. The credit for inspiration goes to youtube user "Ciprian Balalau".
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 LcdRed LED
- 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: In Visuino Add Components
- Add InternetTime component
- Add Pulse Generator component and set frequency to: 0.1166667
- Add DeleteRightText component and set length to: 8
- Add DeleteLeftText component and set length to 1
- Add OLED display I2C
Double click on OLED Display component and drag "Draw round rectangle" to the left side (see the picture), set Height:30, width:120, x:4, Y:15
also drag "Text field" to the left side (see the picture), set x:17 Y:30
Step 5: 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 host: time-b-g.nist.gov
Under Properties window set port: 37
Step 6: In Visuino: Connecting Components
- Connect NodeMCU ESP-12 Modules.WiFi.Sockets.TCPClient1 PIN [IN] to InternetTime1 PIN [Socket]
- Connect PulseGenerator1 PIN [OUT] to InternetTime1 PIN [Clock]
- Connect InternetTime1 PIN [Out] to NodeMCU ESP-12 Serial  PIN [IN] and to DeleteRightText1 PIN [IN]
- Connect DeleteRightText1 PIN [OUT] to DeleteLeftText1 PIN [IN]
- Connect DeleteLeftText1 PIN [OUT] to DisplayOLED1 Elements.Text Field1 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 current time and date.
Congratulations! You have completed your Live Internet Time 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