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.
main.cpp@26:53ab8f8615dd, 2015-05-03 (annotated)
- Committer:
- jordaahh
- Date:
- Sun May 03 19:11:58 2015 +0000
- Revision:
- 26:53ab8f8615dd
- Parent:
- 23:986a6ad0d321
- Child:
- 29:f70d927c3e11
final with docs.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jordaahh | 23:986a6ad0d321 | 1 | /** |
| jordaahh | 23:986a6ad0d321 | 2 | @file main.cpp |
| jordaahh | 23:986a6ad0d321 | 3 | |
| jordaahh | 23:986a6ad0d321 | 4 | @brief Program implementation |
| jordaahh | 23:986a6ad0d321 | 5 | */ |
| jordaahh | 10:ffac6dc620ff | 6 | |
| jordaahh | 23:986a6ad0d321 | 7 | #include "main.h" |
| jordaahh | 10:ffac6dc620ff | 8 | |
| jordaahh | 10:ffac6dc620ff | 9 | int main() |
| jordaahh | 0:a28ad0db4228 | 10 | { |
| jordaahh | 26:53ab8f8615dd | 11 | //set_time(0); // enter unix time then delete from main function to set time |
| jordaahh | 13:677d398423f7 | 12 | power = 1; |
| jordaahh | 26:53ab8f8615dd | 13 | lcd.init(); |
| jordaahh | 0:a28ad0db4228 | 14 | calibrateJoystick(); // get centred values of joystick |
| jordaahh | 26:53ab8f8615dd | 15 | pollJoystick.attach(&updateJoystick,1.0/15.0); // read joystick 15 times per second |
| jordaahh | 21:a239f5a92464 | 16 | wallMovement.attach(&flagForWall,0.2); // call function flagForWall to make flag=1, every 0.2 seconds |
| jordaahh | 21:a239f5a92464 | 17 | wallMovement2.attach(&flagForWall2,0.2); // call function flagForWall2 to make flag=1, every 0.2 seconds |
| jordaahh | 21:a239f5a92464 | 18 | wallMovement3.attach(&flagForWall3,0.2); // call function flagForWall3 to make flag=1, every 0.2 seconds |
| jordaahh | 21:a239f5a92464 | 19 | flash.attach(&flagForFlash,1); // call function flagForWall3 to make flag=1, every 1 seconds |
| jordaahh | 10:ffac6dc620ff | 20 | menu(); |
| jordaahh | 13:677d398423f7 | 21 | } |
| jordaahh | 13:677d398423f7 | 22 |