12

Dependencies:   mbed C12832 MMA7660

Committer:
chris
Date:
Thu Feb 06 17:00:28 2014 +0000
Revision:
5:636ebfdf373b
Parent:
4:39c7c31b8fb0
Child:
6:8b78adfc4faa
First check in

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dreschpe 0:f6a57b843f79 1 #include "mbed.h"
chris 3:2db94ee076ee 2 #include "C12832.h"
chris 5:636ebfdf373b 3 #include "MMA7660.h"
dreschpe 0:f6a57b843f79 4
chris 4:39c7c31b8fb0 5 // Using Arduino pin notation
chris 4:39c7c31b8fb0 6 C12832 lcd(D11, D13, D12, D7, D10);
chris 5:636ebfdf373b 7 MMA7660 MMA(SDA,SCL);
dreschpe 1:1c6a9eaf55b5 8
dreschpe 0:f6a57b843f79 9 int main()
dreschpe 0:f6a57b843f79 10 {
chris 2:a87e255a8f3a 11 lcd.cls();
chris 2:a87e255a8f3a 12 lcd.locate(0,3);
chris 4:39c7c31b8fb0 13 lcd.printf("mbed application shield!");
dreschpe 0:f6a57b843f79 14
chris 5:636ebfdf373b 15 while(1) {
chris 5:636ebfdf373b 16 lcd.locate(0,14);
chris 5:636ebfdf373b 17 lcd.printf("x=%.2f y=%.2f z=%.2f",MMA.x(), MMA.y(), MMA.z());
chris 5:636ebfdf373b 18 wait(0.2);
dreschpe 0:f6a57b843f79 19 }
dreschpe 0:f6a57b843f79 20 }