처음

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 //------------------------------------
00004 // Hyperterminal configuration
00005 // 9600 bauds, 8-bit data, no parity
00006 //------------------------------------
00007 
00008 Serial pc(SERIAL_TX, SERIAL_RX);
00009 
00010 DigitalOut myled(LED1);
00011 DigitalIn button(PC_13);
00012 
00013 
00014 int main()
00015 {
00016     while(1) {
00017         if (button)myled =0;
00018         else myled =1;;
00019     }
00020 }