In this tutorial we will make a simple Volume Indicator using GC9A01 SPI Display, rotary encoder, Arduino and Visuino program.
Watch the video!
Arduino UNO (or any other Arduino or ESP)GC9A01 SPI DisplayRotary encoder moduleJumper wiresBreadboardVisuino program: Download Visuino
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]
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
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