![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
レポート 課題5
Fork of test1 by
main.cpp
- Committer:
- 12f2027a
- Date:
- 2014-05-19
- Revision:
- 0:6cd606287eb8
- Child:
- 1:dd1f5b571cc2
File content as of revision 0:6cd606287eb8:
#include "mbed.h" BusOut leds(P1_13, P1_14, P1_22, P0_17, P0_18, P0_19, P1_15, P0_1); int main() { while(1) { void roll1(); void roll2(); } } void roll1() { int i; for(i = 0; i < 8; i++) { leds = 1 << i; wait(0.3); } } void roll2() { int j; for(j = 0; j < 8; jj=^^+2) { leds = 192 >> j; wait(0.1); } }