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: C12832 MMA7660 mbed
Revision 2:c2ebc7fa80eb, committed 2015-10-30
- Comitter:
- mpetovello
- Date:
- Fri Oct 30 05:51:44 2015 +0000
- Parent:
- 1:441b51354248
- Commit message:
- Removed global variables.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Oct 30 04:58:24 2015 +0000 +++ b/main.cpp Fri Oct 30 05:51:44 2015 +0000 @@ -3,20 +3,20 @@ #include "C12832.h" // LCD display -// create an accelerometer object -MMA7660 accelerometer(p28, p27); - -// LCD display -C12832 lcd(p5, p7, p6, p8, p11); - -// joystick -BusIn joystick(p15,p12,p13,p16); - -// LEDs -BusOut LEDs(LED1,LED2,LED3,LED4); - int main() { + // create an accelerometer object + MMA7660 accelerometer(p28, p27); + + // LCD display + C12832 lcd(p5, p7, p6, p8, p11); + + // joystick + BusIn joystick(p15,p12,p13,p16); + + // LEDs + BusOut LEDs(LED1,LED2,LED3,LED4); + // try to establish a connection with the accelerometer if( !accelerometer.testConnection() ) {