Test program for the accelerometer on the app shield
Fork of app-shield-accelerometer by
main.cpp
00001 #include "mbed.h" 00002 #include "C12832.h" 00003 #include "MMA7660.h" 00004 00005 // Using Arduino pin notation 00006 C12832 lcd(D11, D13, D12, D7, D10); 00007 MMA7660 MMA(D14,D15); 00008 00009 00010 int main() 00011 { 00012 lcd.cls(); 00013 lcd.locate(0,3); 00014 lcd.printf("mbed application shield!"); 00015 00016 while(1) { 00017 lcd.locate(0,14); 00018 lcd.printf("x=%.2f y=%.2f z=%.2f",MMA.x(), MMA.y(), MMA.z()); 00019 wait(0.2); 00020 } 00021 }
Generated on Tue Jul 12 2022 13:02:49 by 1.7.2