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
main.cpp
- Committer:
- screamer
- Date:
- 2014-04-01
- Revision:
- 1:bad592d14bea
- Parent:
- 0:cc9d7d4dfb99
- Child:
- 2:9535cae29d9b
File content as of revision 1:bad592d14bea:
#include "mbed.h"
#include "C12832.h"
#include "MMA7660.h"
C12832 lcd(D11, D13, D12, D7, D10);
MMA7660 MMA(D14, D15);
int main()
{
// clear the screen
lcd.cls();
// print the first line and wait 3 sec
lcd.locate(0,3);
if (!MMA.testConnection()) {
lcd.printf("failed to initialize!");
} else {
lcd.printf("mbed application board!");
}
wait(3);
// print the counter prefix; the number will be printed in the while loop
int i=1;
while(i++) {
lcd.locate(0,15);
lcd.printf("x: %f, y: %f ", MMA.x(), MMA.y());
wait(0.2);
}
}