BlinkerRGB心中包读取亮度值错误
手机返回APP时,要设置成离开时的值,在心跳包时加入PRINT语句,获取亮度值错误,心跳包里不加,能获取值。//灯带回调
void rgblight_callback(uint8_t r_value, uint8_t g_value, uint8_t b_value, uint8_t bright_value)
{
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
BLINKER_LOG("r value: ", r_value);
BLINKER_LOG("g value: ", g_value);
BLINKER_LOG("b value: ", b_value);
BLINKER_LOG("brightness value: ", bright_value);
R_value = r_value;
G_value = g_value;
B_value = b_value;
Bright_value = bright_value;
BLINKER_LOG("R value: ", r_value);
BLINKER_LOG("G value: ", g_value);
BLINKER_LOG("B value: ", b_value);
BLINKER_LOG("Brightness value: ", bright_value);
pixels.setBrightness(bright_value);
for (int i = 0; i < NUMPIXELS; i++) {
pixels.setPixelColor(i, r_value, g_value, b_value);
}
pixels.show();
}
//心跳包
void heartbeat()
{
RGBlight.print(R_value, G_value, B_value, Bright_value);//心跳包不加入,没错误。
}
log:
r value: 29
g value: 255
b value: 9
brightness value: 0
R value: 29
G value: 255
B value: 9
Brightness value: 0
IOS还是android?app版本是? android 2.2.8可以参考:https://www.arduino.cn/thread-91886-1-1.html
ios要等月底更新了
coloz 发表于 2019-11-12 14:55
android 2.2.8可以参考:https://www.arduino.cn/thread-91886-1-1.html
ios要等月底更新了
感谢,我去试试
页:
[1]