Assignment 3 and 4. Both in commits.

Dependencies:   MODSERIAL mbed

Revision:
3:b05acad8736e
Parent:
2:ae67659d1fca
--- a/main.cpp	Fri Sep 04 07:26:58 2015 +0000
+++ b/main.cpp	Fri Sep 04 08:27:05 2015 +0000
@@ -29,8 +29,11 @@
 
 //first part is creating a new datatype, enum blinkstate
 //second part is defining the names between {}
-//third part is creating a variable of the enum blinkstate type.
-enum blinkstates {BLINKRED,BLINKGREEN,BLINKBLUE,BLINKNONE} blink_state;
+enum BlinkState {BLINKRED,BLINKGREEN,BLINKBLUE,BLINKNONE};
+
+//we now have a new datatype BlinkState. Just as with
+//floats and ints, we can create a new variable and initialize it:
+BlinkState blink_state = BLINKNONE;
 
  
  //function to flip one LED
@@ -69,7 +72,6 @@
 int main()
 {
     Ticker ledtick;
-    blink_state = BLINKNONE;//initialize
     ledtick.attach(blink3Leds, period_led/2);
 
     r_led.write(led_off);