Chris Styles
/
apps-shield-pots
Test program for mbed app shield pots
Fork of mbed-app-shield by
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "C12832.h" 00003 00004 C12832 lcd(D11, D13, D12, D7, D10); 00005 00006 AnalogIn pot1 (A0); 00007 AnalogIn pot2 (A1); 00008 00009 int main() 00010 { 00011 while(1) { 00012 lcd.cls(); 00013 lcd.locate(0,3); 00014 lcd.printf("Pot 1 = %.2f", (float)pot1); 00015 lcd.locate(0,14); 00016 lcd.printf("Pot 2 = %.2f", (float)pot2); 00017 wait(0.1); 00018 } 00019 }
Generated on Tue Jul 12 2022 11:50:39 by 1.7.2