Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
raulmelo
Date:
Tue Feb 14 16:52:33 2012 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 3281e994e83b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Feb 14 16:52:33 2012 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+AnalogIn IrSensor(p20);
+Serial serial(USBTX, USBRX);
+
+int main() 
+{
+ float IrVoltage = 0;
+ 
+serial.baud(9600);
+ 
+while(1) {
+ IrVoltage=IrSensor.read();
+ serial.printf("Voltage: %f\r\n", IrVoltage);
+ wait(1);
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r 3281e994e83b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Feb 14 16:52:33 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912