This is my final project for UCSC Extension - USB Programming. It is a home monitoring program for motion and temperature and requires host-side code.

Dependencies:   C12832_lcd HomeMon LM75B MMA7660 USBDevice mbed

Revision:
3:21245644a2e3
Parent:
2:f6a1f96dc3cd
--- a/main.cpp	Tue Sep 03 08:55:16 2013 +0000
+++ b/main.cpp	Tue Sep 03 10:59:21 2013 +0000
@@ -160,20 +160,25 @@
                 if (alertState.pendMotion) {
                     alertState.pendMotion = false;
                     send_alert(MOTION);
+                    motionLED = 0;
                 }
-                else if (alertState.pendTempHi) {
+                if (alertState.pendTempHi) {
                     alertState.pendTempHi = false;
                     send_alert(TEMP_HI);
+                    tempHiLED = 0;
                 }
-                else if (alertState.pendTempLo) {
+                if (alertState.pendTempLo) {
                     alertState.pendTempLo = false;
                     send_alert(TEMP_LOW);
+                    tempLoLED = 0;
                 }
             }
             else {
                 lcd.cls();
                 lcd.locate(0,3);
                 lcd.printf("Not Connected to Host\n");
+                theTemp= get_temp();
+                lcd.printf("L=%.2f H=%.2f Temp=%.2f\n", myTemp.get_min(), myTemp.get_max(), theTemp);
                 connectionLED = 0;
             }
         }