Junichi Katsu
/
Grove_LEDBar
GROVE - LEDバー サンプルプログラム
main.cpp@0:3bb6b8bf827f, 2013-11-30 (annotated)
- Committer:
- jksoft
- Date:
- Sat Nov 30 03:05:20 2013 +0000
- Revision:
- 0:3bb6b8bf827f
Rev1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:3bb6b8bf827f | 1 | #include "mbed.h" |
jksoft | 0:3bb6b8bf827f | 2 | #include "LEDBar.h" |
jksoft | 0:3bb6b8bf827f | 3 | |
jksoft | 0:3bb6b8bf827f | 4 | LED_Bar ledbar(p5,p6); // clk data |
jksoft | 0:3bb6b8bf827f | 5 | |
jksoft | 0:3bb6b8bf827f | 6 | int main() { |
jksoft | 0:3bb6b8bf827f | 7 | ledbar.set_LED_Index(0x355); |
jksoft | 0:3bb6b8bf827f | 8 | wait(3.0); |
jksoft | 0:3bb6b8bf827f | 9 | |
jksoft | 0:3bb6b8bf827f | 10 | while(1) { |
jksoft | 0:3bb6b8bf827f | 11 | for (int i=0;i<=10;i++){ |
jksoft | 0:3bb6b8bf827f | 12 | ledbar.set_LED_Range(i); |
jksoft | 0:3bb6b8bf827f | 13 | wait(1.0); |
jksoft | 0:3bb6b8bf827f | 14 | } |
jksoft | 0:3bb6b8bf827f | 15 | } |
jksoft | 0:3bb6b8bf827f | 16 | } |