Dependencies:   mbed lwip

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Tue Sep 22 11:55:03 2009 +0000
Parent:
0:c88750da21d0
Commit message:

Changed in this revision

Objects.cpp Show diff for this revision Revisions of this file
Objects.h Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c88750da21d0 -r 7354a0bac81a Objects.cpp
--- a/Objects.cpp	Sat Sep 19 00:14:43 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#include "Objects.h"
-
-LocalFileSystem local("local");
-Serial pc(USBTX, USBRX);
-
-InterruptIn RedButton(p30,"redbutton");
-DigitalIn GreenButton(p29,"greenbutton");
-DigitalIn BlueButton(p28,"bluebutton");
-
-DigitalOut led1(LED1,"led1");
-DigitalOut led2(LED2,"led2");
-DigitalOut led3(LED3,"led3");
-DigitalOut led4(LED4,"led4");
-
-AnalogIn light(p16);
-AnalogIn pot(p20,"pot");
-
-RFID rfid (NC,p27);
-MobileLCD lcd(p11, p12, p13, p14, p15);
-LIS302 acc (p5,p6,p7,p8);
-RGBLED rgb (p24,p22,p23);
-Servo servo (p21);
-SRF05 srf (p10,p9);
-
-usbhid hid;
-
diff -r c88750da21d0 -r 7354a0bac81a Objects.h
--- a/Objects.h	Sat Sep 19 00:14:43 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#include "mbed.h"
-
-#include "HTTPServer.h"
-#include "HTTPRPC.h"
-#include "HTTPFS.h"
-
-#include "MobileLCD.h"
-#include "LIS302.h"
-#include "RFID.h"
-#include "RGBLED.h"
-#include "Servo.h"
-#include "usbhid.h"
-#include "SRF05.h"
-
-extern LocalFileSystem local;
-extern Serial pc;
-
-extern InterruptIn RedButton;
-extern DigitalIn GreenButton;
-extern DigitalIn BlueButton;
-
-extern DigitalOut led1;
-extern DigitalOut led2;
-extern DigitalOut led3;
-extern DigitalOut led4;
-
-extern AnalogIn light;
-extern AnalogIn pot;
-
-extern RFID rfid;
-extern MobileLCD lcd;
-extern LIS302 acc;
-extern RGBLED rgb;
-extern Servo servo;
-extern SRF05 srf;
-
-extern usbhid hid;
-
-
-
-
diff -r c88750da21d0 -r 7354a0bac81a main.cpp
--- a/main.cpp	Sat Sep 19 00:14:43 2009 +0000
+++ b/main.cpp	Tue Sep 22 11:55:03 2009 +0000
@@ -1,4 +1,4 @@
-#include "Objects.h"
+#include "DemoBoard.h"
 
 /*
  * This project used and ultrasonic range finder to blend and RGB LED from
@@ -17,10 +17,10 @@
         float normalised = (2.0/d) - 0.02;
         
         // Set the red component to get brighter the closer the range
-        rgb.red(norm);
+        rgb.red(normalised);
         
         // Set the red component to get brighter the further the range
-        rgb.green(1.0-norm);
+        rgb.green(1.0-normalised);
 
         // For completeness, print the measured range 
         pc.printf("Range is %.1f cm\n",(float)srf);