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@17:d9fb4a3780c7, 2015-07-07 (annotated)
- Committer:
- ADAMSTRUTT
- Date:
- Tue Jul 07 08:47:35 2015 +0000
- Revision:
- 17:d9fb4a3780c7
- Parent:
- 16:745001c41fee
- Child:
- 18:bb632df62f51
- Child:
- 20:0b2279011691
START!! THIS TIME FOR REAL
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ADAMSTRUTT | 17:d9fb4a3780c7 | 1 | #include "mbed.h" |
| ADAMSTRUTT | 15:a468af6ba5a4 | 2 | |
| ADAMSTRUTT | 15:a468af6ba5a4 | 3 | int radius; |
| ADAMSTRUTT | 15:a468af6ba5a4 | 4 | float number_sensors; |
| ADAMSTRUTT | 15:a468af6ba5a4 | 5 | |
| ADAMSTRUTT | 15:a468af6ba5a4 | 6 | float Distance(){ |
| ADAMSTRUTT | 15:a468af6ba5a4 | 7 | { |
| ADAMSTRUTT | 15:a468af6ba5a4 | 8 | |
| ADAMSTRUTT | 15:a468af6ba5a4 | 9 | pc.prinf('Ready to read\n'); |
| ADAMSTRUTT | 15:a468af6ba5a4 | 10 | while (1){ |
| ADAMSTRUTT | 15:a468af6ba5a4 | 11 | if (pc.readable()){ |
| ADAMSTRUTT | 15:a468af6ba5a4 | 12 | radius = pc.read(); |
| ADAMSTRUTT | 15:a468af6ba5a4 | 13 | number_sensors()= pc.read(); |
| ADAMSTRUTT | 15:a468af6ba5a4 | 14 | break; |
| ADAMSTRUTT | 15:a468af6ba5a4 | 15 | } |
| ADAMSTRUTT | 15:a468af6ba5a4 | 16 | } |
| ADAMSTRUTT | 16:745001c41fee | 17 | } |