EasyLoader (beta)

Current Product Don't Have Test Firmware

Note: pls, use PC chrome/edge browser, if can't connect, refresh the webpage.

1. Click connect button

2. After connected successfully, pick a firmware

3. Click the burn button

4. After burning successfully, Unplug the device and restart.

0%

Module ENCODER

SKU:A006

描述

ENCODER 是一款兼容 FACE 套件的旋钮控制面板.专为旋转编码控制而设计,其内部集成Mega328微处理器,在旋钮的周围嵌入了由12个LED组成的LED灯环. M5Core与ENCODER之间的串行通信协议是I2C(地址:0x5E)

产品特性

  • RGB Led显示
  • I2C 通讯
  • 简洁的API接口
  • 内置Mega328
  • 编码器检测

包含

  • 1x M5Stack ENCODER 模块

规格参数

规格 参数
RGB LED x12
净重 27g
毛重 47g
产品尺寸 58.2*54.2*28mm
包装尺寸 95*65*25mm
材质 Plastic(PC)

EasyLoader

EasyLoader是一个简洁快速的程序烧录器,其内置了一个产品相关的案例程序,通过简单步骤将其烧录至主控,即可进行一系列的功能验证.

Download Windows Version Easyloader Windows

案例描述:
显示编码器计数和按键状态,左转减少右转增加.

管脚映射

Mega328 ISP下载接口Pin脚定义

相关链接

项目案例

Wireless controller for model trains
I have made the digital command station for model trains (www. zavavov. cz/en/tcs-en/) and now I am working on Wireless controller for it.
M5Stack Faces Encoder Etch A Sketch
An M5Stack version of the classic Etch A Sketch.

功能函数

控制RGB灯圈

/*
    Parameter:
        led_index: 0 ~ 11
        r, g, b: 0 ~ 254
*/
void Led(int led_index, int r, int g, int b){
    // I2C send data
    Wire.beginTransmission(Faces_Encoder_I2C_ADDR);
    Wire.write(led_index);
    Wire.write(r);
    Wire.write(g);
    Wire.write(b);
    Wire.endTransmission();
}

读取编码器增量

void get_encoder_increment(void){
    int temp_encoder_increment;

    // I2C 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;
    }
}

案例程序

1.Arduino IDE

2.UIFlow