2019年度キャンパスプロジェクトで使用する基盤のテストコードです。
Dependencies: TLC59116
Revision 1:61ceb7b49db8, committed 2021-11-09
- Comitter:
- Suzutomo
- Date:
- Tue Nov 09 07:38:18 2021 +0000
- Parent:
- 0:a010f4a9fcdd
- Commit message:
- last commit
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Oct 26 09:22:30 2019 +0000 +++ b/main.cpp Tue Nov 09 07:38:18 2021 +0000 @@ -1,12 +1,26 @@ #include "mbed.h" +#include "TLC59116.h" + +TLC59116 led(PB_9,PB_8,0x60<<1); +I2C i2c(PB_9,PB_8); DigitalOut led1(LED1); // main() runs in its own thread in the OS -int main() { +int main() +{ + printf("Hello World!!"); while (true) { + for (int i = 0; i < 16; i++) { + led.setChannel(i,1); + } led1 = !led1; - wait(0.5); + wait(1); + for (int i = 0; i < 16; i++) { + led.setChannel(i,0); + } + led1 = !led1; + wait(1); } }