Pipeline Technology Centre / Mbed 2 deprecated ConsolTest

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Committer:
aidanPJG
Date:
Tue Jul 07 12:45:11 2015 +0000
Revision:
21:5256c5435b33
Parent:
18:bb632df62f51
Child:
24:92600b1d15b1
Aidan's code, with uncommented distance;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aidanPJG 21:5256c5435b33 1 #include "mbed.h"
aidanPJG 21:5256c5435b33 2
aidanPJG 21:5256c5435b33 3 int radius;
aidanPJG 21:5256c5435b33 4 float number_sensors;
aidanPJG 21:5256c5435b33 5
aidanPJG 21:5256c5435b33 6 float Distance(){
aidanPJG 21:5256c5435b33 7 {
aidanPJG 21:5256c5435b33 8
aidanPJG 21:5256c5435b33 9 pc.prinf('Ready to read\n');
aidanPJG 21:5256c5435b33 10 while (1){
aidanPJG 21:5256c5435b33 11 if (pc.readable()){
aidanPJG 21:5256c5435b33 12 radius = pc.read();
aidanPJG 21:5256c5435b33 13 number_sensors()= pc.read();
aidanPJG 21:5256c5435b33 14 break;
aidanPJG 21:5256c5435b33 15 }
aidanPJG 21:5256c5435b33 16 }
aidanPJG 21:5256c5435b33 17 }