GC9A01 Display - Simple Weather Station

In this tutorial we will make a simple Weather Station using GC9A01 SPI Display, DHT11 Temperature & Humidity sensor, Arduino and Visuino program.

Watch the video!

STEP 1
What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

Arduino UNO (or any other Arduino or ESP)GC9A01 SPI DisplayDHT11 Temperature & Humidity sensorJumper wiresBreadboardVisuino program: Download Visuino

STEP 2
The Circuit

The Circuit

Connect GC9A01 Display pin [VCC] to Arduino pin [3.3V]

Connect GC9A01 Display pin [GND] to Arduino pin [GND]

Connect GC9A01 Display pin [SCL] to Arduino pin [13]

Connect GC9A01 Display pin [SDA] to Arduino pin [11]

Connect GC9A01 Display pin [DC] to Arduino pin [9]

Connect GC9A01 Display pin [CS] to Arduino pin [10]

Connect GC9A01 Display pin [RST ] to Arduino pin [8]

Connect DHT11 Sensor pin [VCC] to Arduino pin [5V]

Connect DHT11 Sensor pin [GND] to Arduino pin [GND]

Connect DHT11 Sensor pin [S] to Arduino digital pin [2]

STEP 3
Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type

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 "Arduino UNO" as shown on Picture 2

STEP 4
In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

Add "DHT11" component

Add 2X "Analog To Text" component

Add "GC9A01" component

STEP 5
In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

Select "AnalogToText1" and in the properties window set "Precision" to 0Select "AnalogToText2" and in the properties window set "Precision" to 0

 

Double click on the "Display1" and in the "Elements" window drag "Draw Rectangle" to the left side and in the properties window set "Color" to aclSteelBlue, "Fill Color" to aclDarkTurquoise, "Height" to 120, "Width" to 300Drag another "Draw Rectangle" to the left side and in the properties window set "Color" to aclSteelBlue, "Fill Color" to aclDeepSkyBlue, "Height" to 300, "Width" to 300, "Y" to 120Drag "Text Field" to the left side and in the properties window set "Size" to 2, "Fill Color" to aclDarkTurquoise, "X" to 80, "Y" to 20Drag another "Text Field" to the left side and in the properties window set "Size" to 2, "Fill Color" to aclDeepSkyBlue, "X" to 80, "Y" to 125For both Text Field elements in the properties select "Elements", click on the 3 dot button and in the "Elements" window drag "Font" to the left side and in the properties window set "Font" to Adafruit\FreeMonoBold18pt7b or any other fontClose all the windows
STEP 6
In Visuino Connect Components
Connect "HumidityThermometer1" pin [Sensor] to Arduino digital pin [2]Connect "HumidityThermometer1" pin [Temperature] to "AnalogToText1" pin [In]Connect "HumidityThermometer1" pin [Humidity] to "AnalogToText2" pin [In]Connect "AnalogToText1" pin [Out] to "Display1" > "TextField1" pin [In]Connect "AnalogToText2" pin [Out] to "Display1" > "TextField2" pin [In]Connect "Display1" pin [Chip Select] to Arduino digital pin [10]Connect "Display1" pin [Data Command] to Arduino digital pin [9]Connect "Display1" pin [Reset] to Arduino digital pin [8]Connect "Display1" Control pin [SPI] to Arduino SPI pin [In]
STEP 7
Generate, Compile, and Upload the Arduino Code

Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

STEP 8
Play

If you power the Arduino module, The Display will show the Temperature and Humidity values.

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

icon WeatherStation-GC9A01.zip 1KB Download(3)
License
All Rights
Reserved
licensBg
0