Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:d94848220e71, committed 2012-02-02
- Comitter:
- Tomas
- Date:
- Thu Feb 02 11:01:07 2012 +0000
- Commit message:
- SharpIR example
Changed in this revision
diff -r 000000000000 -r d94848220e71 SHARPIR.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SHARPIR.lib Thu Feb 02 11:01:07 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Tomas/code/SHARPIR/#323d66022af5
diff -r 000000000000 -r d94848220e71 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Feb 02 11:01:07 2012 +0000
@@ -0,0 +1,11 @@
+#include "mbed.h"
+#include "SHARPIR.h"
+
+SHARPIR Sensor(p10); //the output of the sharpIR sensor is connected to the MBEDs pin 10.
+int main() {
+ float DistanceCM;
+ while (1) { //creates an eternal loop
+ DistanceCM=Sensor.cm();
+ wait_ms(20); //wait 20 ms between each readout
+ }
+}
diff -r 000000000000 -r d94848220e71 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Feb 02 11:01:07 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/b4b9f287a47e