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.
Dependencies: ISR_Mini-explorer_tmp2
Diff: main.cpp
- Revision:
- 0:ca6c5200a318
- Child:
- 1:8fd592bac4de
diff -r 000000000000 -r ca6c5200a318 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Apr 19 15:44:58 2018 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "robot.h" // Inicializa o robô. Este include deverá ser usado em todos os main.cpp!
+#include "Radio.h"
+#include "Rangefinder.h"
+
+int main()
+{
+ initRobot(124);
+
+ while(1) {
+ if( read_rangefinder() == 0 ) {
+ for(int i = 0; i < 16; i++) {
+ if(rgfMeasurements[i] > 1270)
+ pc.printf("%d=%u ", i, 0);
+ else
+ pc.printf("%d=%u ", i, rgfMeasurements[i]);
+ }
+ pc.printf("\n");
+ }
+
+ wait(0.5);
+ }
+}