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
main.cpp@3:6b9c79881a4d, 2019-10-30 (annotated)
- Committer:
- YUPPY
- Date:
- Wed Oct 30 11:19:47 2019 +0000
- Revision:
- 3:6b9c79881a4d
- Child:
- 4:64896b50bbc1
US015 newcode
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
YUPPY | 3:6b9c79881a4d | 1 | #include "mbed.h" |
YUPPY | 3:6b9c79881a4d | 2 | #include "us015.h" |
YUPPY | 3:6b9c79881a4d | 3 | |
YUPPY | 3:6b9c79881a4d | 4 | US015 hs(p12,p11); |
YUPPY | 3:6b9c79881a4d | 5 | |
YUPPY | 3:6b9c79881a4d | 6 | int main() |
YUPPY | 3:6b9c79881a4d | 7 | { |
YUPPY | 3:6b9c79881a4d | 8 | while(1) { |
YUPPY | 3:6b9c79881a4d | 9 | hs.TrigerOut(); |
YUPPY | 3:6b9c79881a4d | 10 | wait(1); |
YUPPY | 3:6b9c79881a4d | 11 | int distance; |
YUPPY | 3:6b9c79881a4d | 12 | distance = hs.GetDistance(); |
YUPPY | 3:6b9c79881a4d | 13 | printf("%d\n",distance); |
YUPPY | 3:6b9c79881a4d | 14 | } |
YUPPY | 3:6b9c79881a4d | 15 | } |