Display CPU TIME on ESP Wemos D1 OLED

by RonFrtek in Circuits > Arduino

1254 Views, 3 Favorites, 0 Comments

Display CPU TIME on ESP Wemos D1 OLED

Arduino Display CPU time using Visuino and ESP Wemos D1 OLED

In this tutorial we will use a ESP Wemos D1 OLED and Visuino to display a CPU Time on OLED display.

Watch a demonstration video.

What You Will Need

images.jpg
Visuino Logo PNG.png

ESP Wemos D1 OLED

Visuino program: Download Visuino

Visuino

FC2S7PKK1OEATKR.LARGE.jpg
F2NDBQZK1OEATKU.LARGE.jpg

All you need to do is drag and drop components and Connect them together. Visuino will create the working code for you so you don’t have to waste time on creating the code. It will do all the hard work for you fast and easy! Visuino is perfect for all kind of projects, you can easily build complex projects in no time!

Download the Latest Powerful Visuino Software

Start Visuino, and Select the Arduino Generic ESP8266 Board Type

F294BW3JFX0MSX9.LARGE.jpg
GENERIC-ESP8266.jpg

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 Generic ESP8266! The Visuino: https://www.visuino.eu 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 "Generic ESP8266" as shown on Picture 2

In Visuino Add Components

2019-10-15_23-34-28.jpg
2019-10-15_23-40-00.jpg
2019-10-15_23-41-06.jpg
2019-10-15_23-40-51.jpg
2019-10-15_23-40-36.jpg
2019-10-15_23-40-20.jpg
2022-11-29_11-40-41.jpg
  • Add "CPU TIME" component
  • Add "Divide Integer By Value" component, under properties window set value: "1000"
  • Add "OLED SSD 1306/SH1106 OLED DISPLAY (I2C)" component

Select "Generic ESP8266" board & in the properties window expand "I2C Channels" > "I2C" and set "SCL" to 4 and "SDA" to 5

Double click on "DisplayOLED1" component and:

  • drag "Draw Text" to the left
  • drag "Draw Line" to the left
  • drag "Draw Text" to the left
  • drag "Text Field" to the left
  1. Select "Draw Text1" and under properties window set: size:"2", text:"CPU TIME"
  2. Select "Draw Line1" and under properties window set: Width:"120", X:"0", Y:"20"
  3. Select "Draw Text2" and under properties window set: size:"1", text:"Seconds:", X:"0", Y:"40"
  4. Select "Text Field1" and under properties window set: Size:"2", Width:"6", X:"60", Y:"40"

In Visuino Connect Components

cpu-time.png

Connect "CPUTime1" component [Milli Seconds] to "DivideByValue1" component [In]

Connect "DivideByValue1" component [Out] to DisplayOLED1>"Text Field1" [In]

Generate, Compile, and Upload the Arduino Code

FAAEWOFJOWSMLZS.LARGE.jpg
FDQU641JLMKOKCS.LARGE.jpg

In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE

Note: Make sure to select in Arduino>Tools>Board>Generic 8266 Module
It could be some other board (depends on the manufacturer board type that you have)

In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Play

If you power the ESP Wemos D1 OLED module, the Display will start to show "CPU TIME" in seconds.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.eu

Downloads