M5Stack® Encoder Module for M5Stack FACES ESP32 Pocket Computer with 12pcs RGB LED MEGA328 Inside I2C for Arduino

Eachine1
артикул: 1538395
СОГЛАСНО НАШИМ ДАННЫМ, ЭТОТ ПРОДУКТ СЕЙЧАС НЕ ДОСТУПЕН
$9.99
Доставка из: Китай
Описание
Description: ENCODER is compatible with FACE Kit. You can have it replace the keycoard panel inside the FACE kit. It is designed for rotary encoder control, integrated Mega328 microprocessor inside and LEDs around the encoder. The series communication protocol between M5 core and ENCODER is IIC (adress: 0x5E) Product Features: 12 RGB Led IIC communication Simple API for programming Mega328 inside Encoder detection Product Size: 58.2mm x 54.2mm x 10mm Product weight: 17g EasyLoader click to download EasyLoader 2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click "Burn" to start burning. 3.The CP210X (USB driver) needs to be installed before the EasyLoader is burned. Click here to view the driver installation tutorial Function: Control single RGB /* Parameter: led_index: 0 ~ 11 r, g, b: 0 ~ 254 */ void Led(int led_index, int r, int g, int b){ // IIC send data Wire.beginTransmission(Faces_Encoder_I2C_ADDR); Wire.write(led_index); Wire.write(r); Wire.write(g); Wire.write(b); Wire.endTransmission(); }Copy to clipboardErrorCopied Read encoder increment void get_encoder_increment(void){ int temp_encoder_increment; // IIC read data Wire.requestFrom(Faces_Encoder_I2C_ADDR, 3); if(Wire.available()){ temp_encoder_increment = Wire.read();// get increment button_state = Wire.read();// get button value } if(temp_encoder_increment > 127){//anti-clockwise direction = 1;// flag for encoder direction encoder_increment = 256 - temp_encoder_increment; } else{// clockwise direction = 0; encoder_increment = temp_encoder_increment; } }Copy to clipboardErrorCopied Package Included: 1x M5Stack ENCODER Module Encoder turnpanel Related Link: Offical Video Forum The Firmware of inside MEGA328 Example: for Arduino IDE If you want the complete code faces_encoder.ino, please click here. /* * faces_encoder.ino */ #include #define Faces_Encoder_I2C_ADDR 0X5E // declaration int encoder_increment;//positive: clockwise nagtive: anti-clockwise uint16_t encoder_value=0; int button_state; uint8_t direction;//0: clockwise 1: anti-clockwise int temp_encoder_increment; // initialization M5.begin(); Wire.begin(); // get data from ENCONDER Wire.requestFrom(Faces_Encoder_I2C_ADDR, 3); if(Wire.available()){ temp_encoder_increment = Wire.read();// the first byte: increment button_state = Wire.read();// the second byte: button value } // IIC send data, 4bytes Wire.beginTransmission(Faces_Encoder_I2C_ADDR); Wire.write(led_index); Wire.write(r); Wire.write(g); Wire.write(b); Wire.endTransmission();Copy to clipboardErrorCopied
График изменения цены & курс обмена валют
Пользователи также просматривали

$2,177.76
Boutique 1004T Second-hand Diesel Engine, Can Be Used For Boats, Harvesters Special Diesel Engine
aliexpress.com
$97.20
Ring chandelier for Dining room Kitchen island chandelier 110V 220V Black Gold White linear chandelier lighting fixtures
aliexpress.com
$292.39
Traugel Demure Scoop A Line Lace Wedding Dresses Applique Short Sleeve Button Bride Dress Cathedral Train Bridal Gown
aliexpress.com
$12.28
Sakuma Ritsu Cosplay Wig Game Ensemble Stars ES Sakuma Ritsu 30cm Black Hair Heat Resistant Party Wigs In stock + Free Wig Cap
aliexpress.com
$24.99
The Monster Labubu Series 17cm Zimomo Angel Pink Heartbeat Originality Change Blind Box Backpack Pendant Doll Birthday Gift Toys
aliexpress.com
$13.02
Outdoor Ornaments Wooden Storage Base Flowerpot Holders Plant Display Rack Balcony Stand Stands Desktop
aliexpress.com
$356.00
2021 Hot Sale Illusion O-Neck Cap Sleeve Court Train Bridal Ball Gown Elegant Lace Up Embroidery Appliques Tulle Wedding Dress
aliexpress.com
$59.90
2021Fashion Harajuku Unisex Hoodies Couple Sweatshirt Men's Hoodies Japanese Anime Funny Printed Oversize Pullover Streetwear
aliexpress.com
$19.45
2021 British fashion women's shoes fashion work boots large size printing autumn ladies high top Martin boots women
aliexpress.com
$61.25
Platz Glenco Модель Европейский Классический Автомобиль Набор Jaguar XK120 Ferrari Спортивный Автомобиль Пластиковая Модель GM03604 1/72 & (Машина)
joom.com
$70.97
DK810 Summer new thin section straight cool sense of elastic loose versatile light business suit casual trousers men
aliexpress.com









