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
Distance.cpp@21:5256c5435b33, 2015-07-07 (annotated)
- 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?
| User | Revision | Line number | New 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 | } |