Mark Petovello / Mbed 2 deprecated etch-a-sketch

Dependencies:   C12832 MMA7660 mbed

Files at this revision

API Documentation at this revision

Comitter:
mpetovello
Date:
Fri Oct 30 05:51:44 2015 +0000
Parent:
1:441b51354248
Commit message:
Removed global variables.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Oct 30 04:58:24 2015 +0000
+++ b/main.cpp	Fri Oct 30 05:51:44 2015 +0000
@@ -3,20 +3,20 @@
 #include "C12832.h"                 // LCD display
 
 
-// create an accelerometer object
-MMA7660 accelerometer(p28, p27);
-
-// LCD display
-C12832 lcd(p5, p7, p6, p8, p11);
-
-// joystick
-BusIn joystick(p15,p12,p13,p16);
-
-// LEDs
-BusOut LEDs(LED1,LED2,LED3,LED4);
-
 int main() 
 {  
+    // create an accelerometer object
+    MMA7660 accelerometer(p28, p27);
+    
+    // LCD display
+    C12832 lcd(p5, p7, p6, p8, p11);
+    
+    // joystick
+    BusIn joystick(p15,p12,p13,p16);
+    
+    // LEDs
+    BusOut LEDs(LED1,LED2,LED3,LED4);
+
     // try to establish a connection with the accelerometer
     if( !accelerometer.testConnection() )
     {