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
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(I2C_SDA,I2C_SCL); 00008 enum Orientation {Up, Down, 00009 Right, Left, 00010 Back, Front, 00011 Unknown 00012 }; 00013 00014 int main() 00015 { 00016 00017 00018 while(1) { 00019 lcd.locate(0,0); 00020 if (MMA.getSide()==Front) { 00021 lcd.cls(); // pour ne pas avoir Desssus écrit sur Dessous 00022 lcd.printf("Dessus"); 00023 } else if (MMA.getSide()==Back) lcd.printf("Dessous"); 00024 wait(0.2); 00025 } 00026 }
Generated on Thu Jul 14 2022 11:19:20 by
1.7.2
