Rotary Encoder Using Arduino Nano
by MrSottong in Circuits > Arduino
7288 Views, 3 Favorites, 0 Comments
Rotary Encoder Using Arduino Nano
Hi everyone,
In this article I will make a tutorial on how to use a rotary encoder using Arduino Nano. To use this Rotary encoder you don't need an external library. So we can directly create programs without adding libraries first. ok
Let's start the tutorial.
Required Components
The component that you need:
- Arduino Nano
- Rotary Encoder
- Jumper Wire
- Project board
- Laptop
Assemble All Components
see the picture above for a guide to assemble it.
Arduino to Rotary Encoder
GND ==> GND
+5V ==> +
D6 ==> CLK (PinA)
D7 ==> DT (PinB)
Programming
Please download the sketch I have prepared below.
Result
When the Rotary Encoder is turned to the left, the resulting value will be smaller.
When the Rotary Encoder is rotated to the right, the resulting value will be even greater.