valeur de x de l'accéléromètre

Dependencies:   C12832 MMA7660 mbed

Fork of app-shield-accelerometer by Chris Styles

Committer:
rtk
Date:
Mon Nov 02 14:25:24 2015 +0000
Revision:
6:8b78adfc4faa
Parent:
5:636ebfdf373b
valeur de x de l'acc?l?rom?tre

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);
rtk 6:8b78adfc4faa 7 MMA7660 MMA(I2C_SDA,I2C_SCL);
rtk 6:8b78adfc4faa 8
dreschpe 1:1c6a9eaf55b5 9
dreschpe 0:f6a57b843f79 10 int main()
dreschpe 0:f6a57b843f79 11 {
chris 2:a87e255a8f3a 12 lcd.cls();
rtk 6:8b78adfc4faa 13 lcd.locate(0,0);
rtk 6:8b78adfc4faa 14 lcd.printf("lecture de l'accelerometre");
dreschpe 0:f6a57b843f79 15
chris 5:636ebfdf373b 16 while(1) {
rtk 6:8b78adfc4faa 17 lcd.locate(0,8);
rtk 6:8b78adfc4faa 18 lcd.printf("x=%.2f",MMA.x());
chris 5:636ebfdf373b 19 wait(0.2);
dreschpe 0:f6a57b843f79 20 }
dreschpe 0:f6a57b843f79 21 }