Simple Volume Indicator - GC9A01 Display Using Visuino

In this tutorial we will make a simple Volume Indicator using GC9A01 SPI Display, rotary encoder, 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 DisplayRotary encoder moduleJumper 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 Encoder module pin [CLK] to Arduino digital pin [2]Connect Encoder module pin [DT] to Arduino digital pin [3]Connect Encoder module pin [+] to Arduino pin [5v]Connect Encoder module pin [-] to Arduino pin [GND]

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

In Visuino Add Components

Add "GC9A01" componentAdd "Rotary Encoder Sensor" componentAdd "Integer Multi Source" componentAdd "Integer To Text" 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

Select "RotaryEncoderSensor1" and in the properties window set "Max" > "Roll Over" to False and "Max" > "Value" to 360Select "RotaryEncoderSensor1" and in the properties window set "Min" > "Roll Over" to False and "Min" > "Value" to 0Select "MultiSource1" and in the properties window set "Output pins" to 7

 

Double click on the "Display1" and in the "Elements" window drag "Draw Angled Line" to the left side and in the properties window set "Color" to aclWhite, "X" to 120, "Y" to 120, "Begin" to 51, "End" to 100, select "Angle" and click on the pin icon and select "Float SinkPin"Drag another "Draw Angled Line" to the left side and in the properties window set "Color" to aclBlack, "X" to 120, "Y" to 120, "Begin" to 51, "End" to 100, select "Angle" and click on the pin icon and select "Float SinkPin"Drag "Draw Ellipse" to the left side and in the properties window set "Height" to 100, "Width" to 100, "Fill Color" to aclBlue, "Color" to aclBlack, "X" to 70, "Y" to 70Drag "Text Field" to the left side and in the properties window set "Size" to 2, "Fill Color" to aclBlue, "Color" to aclWhite, "X" to 100, "Y" to 90For 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\FreeSansBold18pt7b or any other fontClose all the windows

STEP 6
In Visuino Connect Components

Connect Arduino digital pin [3] to "RotaryEncoderSensor1" pin [Direction]Connect Arduino digital pin [2] to "RotaryEncoderSensor1" pin [Clock]Connect "RotaryEncoderSensor1" pin [Out] to "MultiSource1" pin [In]Connect "MultiSource1" pin [0] to "Display1" > "Draw Ellipse1" pin [Clock]Connect "MultiSource1" pin [1] to "Display1" > "Draw Angled Line2" pin [Clock]Connect "MultiSource1" pin [2] to "Display1" > "Draw Angled Line1" pin [Angle]Connect "MultiSource1" pin [3] to "Display1" > "Draw Angled Line2" pin [Angle]Connect "MultiSource1" pin [4] to "Display1" > "Draw Angled Line1" pin [Clock]Connect "MultiSource1" pin [5] to "IntegerToText1" pin [In]Connect "IntegerToText1" pin [Out] to "Display1" > "TextField1" pin [In]Connect "MultiSource1" pin [6] to "Display1" > "TextField1" pin [Clock]

 

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

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 Volume-Control-GC9A01-encoder-Volume.zip 2KB Download(0)
License
All Rights
Reserved
licensBg
0