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.
pot.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 00004 //FVP for lcd. rs,en,d4-d7, type of lcd 00005 TextLCD lcd(PTA1, PTA2, PTD4, PTA12, PTA4, PTA5, TextLCD::LCD16x2); 00006 00007 // Serial pc(USBTX, USBRX); 00008 AnalogIn Ain(PTB0); 00009 float ADCdata; 00010 int main() 00011 { 00012 while (1) { 00013 ADCdata=Ain*1023; 00014 pc.printf("ADC Data Values... \n\r"); 00015 pc.printf("%.2f \n\r",ADCdata); 00016 wait (0.5); 00017 00018 lcd.locate(1,0); //col,row 00019 lcd.printf("analoge value"); 00020 lcd.locate(2,1); //col,row 00021 lcd.printf("%.2f \n\r",ADCdata); 00022 wait(0.5); 00023 lcd.cls(); //clear lcd 00024 } 00025 }
Generated on Thu Aug 4 2022 05:52:50 by
1.7.2