【发布时间】:2013-02-26 19:58:53
【问题描述】:
我使用的是 rainbowduino,它有一些方法可以将单个 r g b 值作为无符号字符,还有一些方法采用 24 位 rgb 颜色代码。
我想将 r g b 值转换为 uint32_t 类型的 24 位颜色代码(这样我的所有代码都只需要使用 r g b 值。
有什么想法吗?
我已经尝试过 uint32_t result = r
Rb.setPixelXY(unsigned char x, unsigned char y, unsigned char colorR, unsigned char colorG, unsigned char colorB)
This sets the pixel(x,y)by specifying each channel(color) with 8bit number.
Rb.setPixelXY(unsigned char x, unsigned char y, unit32_t colorRGB)
This sets the pixel(x,y)by specifying a 24bit RGB color code.
【问题讨论】:
标签: arduino rgb unsigned-char uint32-t