A Simple Programming Workshop - University of Calgary

Dependencies:   mbed C12832 MMA7660

Revision:
2:c2ebc7fa80eb
Parent:
0:a19771db916c
Child:
3:7278142d6a1a
--- 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() )
     {