Rotary Encoder
Introduction
Features
Rotary Encoder Sensor: Provides precise rotational feedback. Through rotation, it generates encoded signals to accurately reflect rotation direction and step count. It is widely used in parameter adjustment scenarios such as volume control and menu selection, allowing users to make fine adjustments while rotating.
Specifications
| Item | Parameter |
|---|---|
| Name | Rotary Encoder |
| SKU | EF16003 |
| Connection | Analog Output |
| Operating Voltage | 4.15V |
| Product Size | 38.00mm×28.00mm (L×W) |
Appearance and Dimensions

Product Links
None
Quick Start
Hardware Connection Diagram

Usage Tutorials
Programming Software
MakeCode Programming
Step 1: Adding the Jacdac Extension
- Go to Microsoft MakeCode and click New Project.

- Enter a project name in the pop-up window and click Create.

- Click Extensions in the code drawer.

- Type "Jacdac" in the search bar, click the magnifying glass icon, and select the Jacdac software library as shown.

Step 2:
- Connect the micro:bit to your computer using a data cable. Note: If this is the first time running a Jacdac program on the micro:bit, preload a blank Jacdac program first. Skip this step if already done.

- Connect the sensor. MakeCode will automatically detect it and simulate the sensor status in the emulator.

- Click ADD BLOCKS for the sensor extension module. Note: Repeat this step each time you connect a new sensor.

Program Code
.png)
Reference Program
Link: https://makecode.microbit.org/_1jp3gk6amULU
You can also download it via the embedded link below:
Results
When the rotation angle of the rotary encoder is > 0, the micro:bit displays "√"; otherwise, it displays "×".
