360 Degree Rotary Encoder Brick Sensor Module

SKU: EK403 Category: Tag:

Apple Shopping Event

Hurry and get discounts on all Apple devices up to 20%

40,00 EGP

10 People watching this product now!

Payment Methods:

Description

<p>The M274 360 Degree Rotary Encoder Module Brick Sensor is a rotary input device (<em>as in knob</em>) that provides an indication of how much the knob has been rotated AND what direction it is rotating in. It’s a great device for stepper and servo motor control.  You could also use it to control devices like digital potentiometers.</p> <p class=""header"">M274 360 rotary Degree encoder, is an incremental electro-mechanical device that converts the angular position or motion of a shaft or axle to digital code. The output of incremental encoders provides information about the motion of the shaft, which is typically further processed in processor/controllers into information such as speed, distance, and position.</p>

🔌
Pin Connections
1 Table
Pin Connections Table 1
BoardSensor PinConnection
EncoderVCC/GND/A/B3.3-5V / GND / board channel-A pin / board channel-B pin
📟
360 Degree Rotary Encoder Brick Sensor Module
7 Examples • C/C++ | Boards: Arduino Uno, Arduino Nano, Arduino Mega, ESP32, ESP8266, STM32, Raspberry Pi Pico
360 Degree Rotary Encoder Brick Sensor Module - Arduino Uno
360 Degree Rotary Encoder Brick Sensor Module - Arduino Nano
360 Degree Rotary Encoder Brick Sensor Module - Arduino Mega
360 Degree Rotary Encoder Brick Sensor Module - ESP32
360 Degree Rotary Encoder Brick Sensor Module - ESP8266
360 Degree Rotary Encoder Brick Sensor Module - STM32
360 Degree Rotary Encoder Brick Sensor Module - Raspberry Pi Pico
📄 File: 360_degree_rotary_encoder_brick_sensor_module_-_arduino_uno.inoArduino Uno
660 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Channel A=2, B=3 on Arduino Uno. Both A and B need interrupt-capable pins on AVR boards (2/3 on Uno/Nano); ESP32/ESP8266/STM32/Pico support interrupts on any GPIO.
6volatile long pulseCount = 0;
7#define ENC_A 2
8#define ENC_B 3
9
10void handleEncoder() {
11 int b = digitalRead(ENC_B);
12 if (b > 0) pulseCount++; else pulseCount--;
13}
14
15void setup() {
16 Serial.begin(115200);
17 pinMode(ENC_A, INPUT_PULLUP);
18 pinMode(ENC_B, INPUT_PULLUP);
19 attachInterrupt(digitalPinToInterrupt(ENC_A), handleEncoder, RISING);
20}
21
22void loop() {
23 Serial.print("Pulse count: "); Serial.println(pulseCount);
24 delay(200);
25}
📄 File: 360_degree_rotary_encoder_brick_sensor_module_-_arduino_nano.inoArduino Nano
661 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Channel A=2, B=3 on Arduino Nano. Both A and B need interrupt-capable pins on AVR boards (2/3 on Uno/Nano); ESP32/ESP8266/STM32/Pico support interrupts on any GPIO.
6volatile long pulseCount = 0;
7#define ENC_A 2
8#define ENC_B 3
9
10void handleEncoder() {
11 int b = digitalRead(ENC_B);
12 if (b > 0) pulseCount++; else pulseCount--;
13}
14
15void setup() {
16 Serial.begin(115200);
17 pinMode(ENC_A, INPUT_PULLUP);
18 pinMode(ENC_B, INPUT_PULLUP);
19 attachInterrupt(digitalPinToInterrupt(ENC_A), handleEncoder, RISING);
20}
21
22void loop() {
23 Serial.print("Pulse count: "); Serial.println(pulseCount);
24 delay(200);
25}
📄 File: 360_degree_rotary_encoder_brick_sensor_module_-_arduino_mega.inoArduino Mega
661 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Channel A=2, B=3 on Arduino Mega. Both A and B need interrupt-capable pins on AVR boards (2/3 on Uno/Nano); ESP32/ESP8266/STM32/Pico support interrupts on any GPIO.
6volatile long pulseCount = 0;
7#define ENC_A 2
8#define ENC_B 3
9
10void handleEncoder() {
11 int b = digitalRead(ENC_B);
12 if (b > 0) pulseCount++; else pulseCount--;
13}
14
15void setup() {
16 Serial.begin(115200);
17 pinMode(ENC_A, INPUT_PULLUP);
18 pinMode(ENC_B, INPUT_PULLUP);
19 attachInterrupt(digitalPinToInterrupt(ENC_A), handleEncoder, RISING);
20}
21
22void loop() {
23 Serial.print("Pulse count: "); Serial.println(pulseCount);
24 delay(200);
25}
📄 File: 360_degree_rotary_encoder_brick_sensor_module_-_esp32.inoESP32
658 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Channel A=32, B=33 on ESP32. Both A and B need interrupt-capable pins on AVR boards (2/3 on Uno/Nano); ESP32/ESP8266/STM32/Pico support interrupts on any GPIO.
6volatile long pulseCount = 0;
7#define ENC_A 32
8#define ENC_B 33
9
10void handleEncoder() {
11 int b = digitalRead(ENC_B);
12 if (b > 0) pulseCount++; else pulseCount--;
13}
14
15void setup() {
16 Serial.begin(115200);
17 pinMode(ENC_A, INPUT_PULLUP);
18 pinMode(ENC_B, INPUT_PULLUP);
19 attachInterrupt(digitalPinToInterrupt(ENC_A), handleEncoder, RISING);
20}
21
22void loop() {
23 Serial.print("Pulse count: "); Serial.println(pulseCount);
24 delay(200);
25}
📄 File: 360_degree_rotary_encoder_brick_sensor_module_-_esp8266.inoESP8266
660 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Channel A=D5, B=D6 on ESP8266. Both A and B need interrupt-capable pins on AVR boards (2/3 on Uno/Nano); ESP32/ESP8266/STM32/Pico support interrupts on any GPIO.
6volatile long pulseCount = 0;
7#define ENC_A D5
8#define ENC_B D6
9
10void handleEncoder() {
11 int b = digitalRead(ENC_B);
12 if (b > 0) pulseCount++; else pulseCount--;
13}
14
15void setup() {
16 Serial.begin(115200);
17 pinMode(ENC_A, INPUT_PULLUP);
18 pinMode(ENC_B, INPUT_PULLUP);
19 attachInterrupt(digitalPinToInterrupt(ENC_A), handleEncoder, RISING);
20}
21
22void loop() {
23 Serial.print("Pulse count: "); Serial.println(pulseCount);
24 delay(200);
25}
📄 File: 360_degree_rotary_encoder_brick_sensor_module_-_stm32.inoSTM32
662 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Channel A=PA0, B=PA1 on STM32. Both A and B need interrupt-capable pins on AVR boards (2/3 on Uno/Nano); ESP32/ESP8266/STM32/Pico support interrupts on any GPIO.
6volatile long pulseCount = 0;
7#define ENC_A PA0
8#define ENC_B PA1
9
10void handleEncoder() {
11 int b = digitalRead(ENC_B);
12 if (b > 0) pulseCount++; else pulseCount--;
13}
14
15void setup() {
16 Serial.begin(115200);
17 pinMode(ENC_A, INPUT_PULLUP);
18 pinMode(ENC_B, INPUT_PULLUP);
19 attachInterrupt(digitalPinToInterrupt(ENC_A), handleEncoder, RISING);
20}
21
22void loop() {
23 Serial.print("Pulse count: "); Serial.println(pulseCount);
24 delay(200);
25}
📄 File: 360_degree_rotary_encoder_brick_sensor_module_-_raspberry_pi_pico.inoRaspberry Pi Pico
670 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Channel A=20, B=21 on Raspberry Pi Pico. Both A and B need interrupt-capable pins on AVR boards (2/3 on Uno/Nano); ESP32/ESP8266/STM32/Pico support interrupts on any GPIO.
6volatile long pulseCount = 0;
7#define ENC_A 20
8#define ENC_B 21
9
10void handleEncoder() {
11 int b = digitalRead(ENC_B);
12 if (b > 0) pulseCount++; else pulseCount--;
13}
14
15void setup() {
16 Serial.begin(115200);
17 pinMode(ENC_A, INPUT_PULLUP);
18 pinMode(ENC_B, INPUT_PULLUP);
19 attachInterrupt(digitalPinToInterrupt(ENC_A), handleEncoder, RISING);
20}
21
22void loop() {
23 Serial.print("Pulse count: "); Serial.println(pulseCount);
24 delay(200);
25}
Quadrature rotary encoder - counts pulses on two channels to track direction/position.

Specification

Specification

WeightWeight0,012 g
Dimensions3 × 2 × 2,5 cm
Product Name360 Degree Rotary Encoder Brick Sensor Module
Sensor TypeRotary Encoder
Rotation Angle360° Continuous
Output TypeIncremental Digital (A/B)
Switch FunctionIntegrated Push Button
Operating Voltage3.3V – 5V
Resolution20 Steps per Revolution
Mounting TypeBrick / Module
InterfaceGPIO
Control MethodClockwise / Counterclockwise Pulses
ApplicationMenu Navigation, Volume Control, Robotics, Arduino Projects

Customer Reviews