Rob Toulson / Mbed 2 deprecated RealTimeLab07_SwitchInput

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 DigitalOut Led1(LED1);
00004 DigitalIn Button1(p17);
00005 
00006 
00007 int main()
00008 {
00009     while(1) {
00010         if (Button1==1) {
00011             Led1=1;
00012         } else {
00013             Led1=0;
00014         }     
00015     }
00016 }