回路講習第2回用プログラム
Dependencies: mbed
main.cpp
- Committer:
- momidi
- Date:
- 2021-05-30
- Revision:
- 0:6ab419decf1c
- Child:
- 1:0cbc07037f22
File content as of revision 0:6ab419decf1c:
#include "mbed.h" DigitalOut led[]= {LED1,LED2,LED3}; Serial pc(USBTX, USBRX); int main() { while(1) { for(int i=0; i<3; i++) { led[i]=1; pc.printf("LED%d is ON\r\n",i+1); wait(1); led[i]=0; wait(1); } } }