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.
Fork of app-shield-LCD by
main.cpp
00001 #include "mbed.h" 00002 #include "C12832.h" 00003 00004 // Using Arduino pin notation 00005 C12832 lcd(D11, D13, D12, D7, D10); 00006 AnalogIn pot1(A0); 00007 AnalogIn pot2(A1); 00008 PwmOut red(D5); 00009 PwmOut green(D9); 00010 00011 00012 00013 int main() 00014 { 00015 int j=0; 00016 float a1, a2; 00017 red.period_ms(4); 00018 green.period_ms(4); 00019 lcd.cls(); 00020 lcd.locate(0,3); 00021 lcd.printf("mbed application shield!"); 00022 00023 while(true) { // this is the third thread 00024 a1 = pot1.read(); 00025 a2 = pot2.read(); 00026 lcd.locate(0,15); 00027 lcd.printf("POT1=%1.3f POT2=%1.3f",a1, a2); 00028 red.write(a1); 00029 green.write(a2); 00030 j++; 00031 wait(0.1); 00032 } 00033 }
Generated on Wed Jul 13 2022 20:33:57 by
1.7.2
