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.
Step 1: Required Componentssee the picture above for a guide to assemble it.
Arduino to Rotary Encoder
GND ==> GND
+5V ==> +
D6 ==> CLK (PinA)
D7 ==> DT (PinB)
Step 3: ProgrammingPlease download the sketch I have prepared below.
Step 4: ResultWhen 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.
Comments
Please log in or sign up to comment.