Template: Rotation Sensor Arduino Guide
From Waveshare Wiki
The Arduino example is written for the Arduino UNO. If you want to connect it to other Arduino boards, you may need to change the connection.
Use with Arduino
Hardware connection
Sensor | Arduino | Description |
---|---|---|
VCC | 5V | Power input |
GMD | GND | Power ground |
SW | D4 | Read the status of the button |
SIB | D3 | Combined with SIA, detect the direction of the encoder. |
SIA | D2 | Combined with SIB, detect the direction of the encoder. |
Examples
- Download the demo codes to your PC and unzip them.
- Install the Arduino IDE on your PC.
- Go into Rotation-Sensor-code/Arduino/Rotation_Sensor.
- Run the Rotation_Senosr.ino file.
- Select the correct Board and the Port.
- Build the project and upload it to the board.
- Open the serial monitor of the Arduino IDE or the SSCOM software and check the serial data.