Michael Parrish / Mbed 2 deprecated EMBEDDED4180

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /* Michael Parrish & Tomas Gowens
00002 ECE 4180 Lab 1 */
00003 
00004 #include "globals.h"
00005 #include "hardware.h"
00006 #include "LEDController.h"
00007 
00008 DigitalIn pb(p8);
00009 DigitalOut myled(LED1);
00010 
00011 // methods in this file
00012 int main()
00013 {
00014     // Part 1: Control a Red LED
00015     pb.mode(PullUp);
00016     while(1) { 
00017         DigitalIn val = pb;
00018         if (!val) {
00019              Control(); 
00020 
00021         } else {
00022            NoControl(); 
00023        }
00024     }
00025     
00026 }