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
- Committer:
- hellohello
- Date:
- 2021-05-03
- Revision:
- 4:c3bb91b3b992
- Parent:
- 3:9ea256470c8a
- Child:
- 5:af5a6c9606e6
File content as of revision 4:c3bb91b3b992:
//embedded systems lab question 3 Aidan Cleary T00209564 //Lab 3: Digital sensors & equations in C //Uses the measured z-acceleration to drive leds 2 and 3 of the mbed #include "mbed.h" #include "MMA7660.h" MMA7660 MMA(p28, p27); DigitalOut connectionLed(LED1); int main() { if (MMA.testConnection()) connectionLed = 1; while(1) { printf("%f, %f, %f \r\n", MMA.x (), MMA.y(), MMA.z()); wait(0.5); } }