sho hashimoto
/
led_serial
led and serial test
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 Serial pc(USBTX, USBRX); // tx, rx 00004 00005 DigitalOut myled1(LED1); 00006 DigitalOut myled2(LED2); 00007 00008 int main() { 00009 while(1) { 00010 myled1 = 1; 00011 myled2 = 0; 00012 pc.printf("led 1 on\r\n"); 00013 wait(0.5); 00014 myled1 = 0; 00015 myled2 = 1; 00016 pc.printf("led 2 on\r\n"); 00017 wait(0.2); 00018 } 00019 }
Generated on Wed Jul 13 2022 19:56:26 by 1.7.2