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@16:745001c41fee, 2015-07-07 (annotated)
- Committer:
- ADAMSTRUTT
- Date:
- Tue Jul 07 08:29:21 2015 +0000
- Revision:
- 16:745001c41fee
- Parent:
- 14:dee4cef00b32
- Parent:
- 15:a468af6ba5a4
- Child:
- 17:d9fb4a3780c7
Proper Start;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ADAMSTRUTT | 15:a468af6ba5a4 | 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 | } |