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: mbed
Diff: Distance.cpp
- Revision:
- 21:5256c5435b33
- Parent:
- 18:bb632df62f51
- Child:
- 24:92600b1d15b1
--- a/Distance.cpp Tue Jul 07 12:36:04 2015 +0000
+++ b/Distance.cpp Tue Jul 07 12:45:11 2015 +0000
@@ -1,17 +1,17 @@
-//#include "mbed.h"
-//
-//int radius;
-//float number_sensors;
-//
-//float Distance(){
-// {
-//
-// pc.prinf('Ready to read\n');
-// while (1){
-// if (pc.readable()){
-// radius = pc.read();
-// number_sensors()= pc.read();
-// break;
-// }
-// }
-// }
\ No newline at end of file
+#include "mbed.h"
+
+int radius;
+float number_sensors;
+
+float Distance(){
+ {
+
+ pc.prinf('Ready to read\n');
+ while (1){
+ if (pc.readable()){
+ radius = pc.read();
+ number_sensors()= pc.read();
+ break;
+ }
+ }
+ }
\ No newline at end of file