明石高専ロボ研 mbedライブラリ
Dependencies: mbed
Diff: neopixel.h
- Revision:
- 8:82727add54ce
- Parent:
- 7:4ad54efe2fdd
diff -r 4ad54efe2fdd -r 82727add54ce neopixel.h --- a/neopixel.h Sun Dec 06 08:09:01 2020 +0000 +++ b/neopixel.h Wed Feb 24 12:34:27 2021 +0000 @@ -11,8 +11,8 @@ int main() { wait(0.2); // wait for HSE to stabilize - npx.global_scale = 1.0f; // Adjust brightness - npx.normalize = true; // Equalize brightness to make r + g + b = 255 + npx.global_scale = 1.0f; // Adjust brightness 明るさを変えるとき以外書かなくていいよ。 + npx.normalize = true; // Equalize brightness to make r + g + b = 255 falseでいい気がする。 npx.setPixelColor(0,0xff0000); npx.setPixelColor(1,0xffff00); @@ -66,8 +66,8 @@ void setBrightness(float brightness);//0~1 void setPixelColor(uint32_t i,uint32_t color); void show(); - void off(bool flag = true); - uint32_t color(uint32_t b,uint32_t g,uint32_t r); + void off(bool flag = true);//送信するかしないか。デフォルトでする。 + uint32_t color(uint8_t b,uint8_t g,uint8_t r); int numPixels(); /** Wait long enough to make the colors show up */