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.
main.cpp
00001 #include "mbed.h" 00002 #include "C12832.h" // LCD on Mbed 00003 00004 PwmOut led1 (LED1); // Control the brightness of LED1 00005 AnalogIn pot1 (p19); //Used to change brightness 00006 C12832 lcd(p5, p7, p6, p8, p11); // Register the pins needed for LCD 00007 00008 int main() 00009 { 00010 00011 while(1) { 00012 led1 = pot1; // LED1 the same value as POT1 00013 lcd.locate(0,0); // Area on LCD to start text 00014 lcd.printf("Potentiometer value 1 = %.2f", pot1.read()); 00015 00016 lcd.locate(0,10); 00017 lcd.printf("Potentiometer value 2 = %.2e", pot1.read()); 00018 00019 wait(0.5); 00020 } 00021 }
Generated on Sat Sep 24 2022 17:31:53 by
1.7.2