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: SRF05 ros_lib_kinetic TinyGPSPlus
PROJ515.cpp@0:215bdd87b602, 2019-04-22 (annotated)
- Committer:
- Luka_Danilovic
- Date:
- Mon Apr 22 18:28:24 2019 +0000
- Revision:
- 0:215bdd87b602
- Child:
- 1:ea2ee36038e7
Started adding ROS components;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Luka_Danilovic | 0:215bdd87b602 | 1 | #include "PROJ515.hpp" // Contains all Libraries, Definitions & Function Prototypes |
| Luka_Danilovic | 0:215bdd87b602 | 2 | |
| Luka_Danilovic | 0:215bdd87b602 | 3 | unsigned int cmDistance1; |
| Luka_Danilovic | 0:215bdd87b602 | 4 | float sPeriod = 0.05; |
| Luka_Danilovic | 0:215bdd87b602 | 5 | |
| Luka_Danilovic | 0:215bdd87b602 | 6 | |
| Luka_Danilovic | 0:215bdd87b602 | 7 | void setupRosMsg() |
| Luka_Danilovic | 0:215bdd87b602 | 8 | {/*CODE*/} |
| Luka_Danilovic | 0:215bdd87b602 | 9 | |
| Luka_Danilovic | 0:215bdd87b602 | 10 | int main() |
| Luka_Danilovic | 0:215bdd87b602 | 11 | { |
| Luka_Danilovic | 0:215bdd87b602 | 12 | while(true) { |
| Luka_Danilovic | 0:215bdd87b602 | 13 | usensor1.start(); |
| Luka_Danilovic | 0:215bdd87b602 | 14 | cmDistance1 = usensor1.get_dist_cm(); |
| Luka_Danilovic | 0:215bdd87b602 | 15 | usbSer.printf("Distance (cm) = %d\n", cmDistance1); |
| Luka_Danilovic | 0:215bdd87b602 | 16 | wait(sPeriod); |
| Luka_Danilovic | 0:215bdd87b602 | 17 | } |
| Luka_Danilovic | 0:215bdd87b602 | 18 | } |