Visuino - Get Accurate Time From Internet NIST Server Using NodeMCU

About: Arduino fan!

In this tutorial we will use NodeMCU Mini from makerfabs, 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".

Step 1: What You Will Need

All the modules are from makerfabs. They have the best quality modules that are Light-years ahead the competition, also with best affordable prices.

  • NodeMCU Mini, link
  • OLED LcdRed LED
  • Breadboard
  • 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 [0] 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

All the modules can be bought at https://www.makerfabs.com

Share

    Recommendations

    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    Discussions