Rotary Encoder Using Arduino Nano

by MrSottong in Circuits > Arduino

7288 Views, 3 Favorites, 0 Comments

Rotary Encoder Using Arduino Nano

photo_2019-11-07_06-59-23.jpg
photo_2019-11-07_06-59-36.jpg

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

IMG_6882.JPG
IMG_6885.JPG
IMG_6886.JPG

The component that you need:

Assemble All Components

bitmap.png
photo_2019-11-07_06-59-40.jpg
photo_2019-11-07_06-59-45.jpg

see the picture above for a guide to assemble it.

Arduino to Rotary Encoder

GND ==> GND

+5V ==> +

D6 ==> CLK (PinA)

D7 ==> DT (PinB)

Programming

s.PNG

Please download the sketch I have prepared below.

Result

Capture.PNG

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.