Display Cpu Time On Esp Wemos D1 Oled

About the project

Display CPU TIME on ESP Wemos D1 OLED

Project info

Difficulty: Easy

Platforms: ArduinoVisuinoEspressif

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Espressif Wemos D1 Mini Espressif Wemos D1 Mini x 1

Software apps and online services

Visuino Visuino
Arduino IDE Arduino IDE

Story

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.

Original Tutorial: https://www.instructables.com/Display-CPU-TIME-on-ESP-Wemos-D1-OLED/

Step 1: What You Will Need

ESP Wemos D1 OLED

Visuino program: Download Visuino

Step 2: Visuino

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

Step 3: Start Visuino, and Select the Arduino WeMos D1 Mini Board Type

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 tutorial will not work! If you have not done follow the steps in this tutorial to setup the Arduino IDE to program WeMos D1 Mini! 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 "WeMos D1 Mini" as shown on Picture 2

Step 4: In Visuino Add Components
  • 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

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
  • Select "Draw Text1" and under properties window set: size:"2", text:"CPU TIME"
  • Select "Draw Line1" and under properties window set: Width:"120", X:"0", Y:"20"
  • Select "Draw Text2" and under properties window set: size:"1", text:"Seconds:", X:"0", Y:"40"
  • Select "Text Field1" and under properties window set: Size:"2", Width:"6", X:"60", Y:"40"

Step 5: In Visuino Connect Components

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

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

Step 6: 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

Note: Make sure to select in Arduino>Tools>Board>Generic 8266 ModuleIt 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)

Step 7: 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 tutorial. You can download and open it in Visuino: https://www.visuino.eu

Schematics, diagrams and documents

cpu-time

Code

Visuino

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...