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_lcd mbed
Temperatur_einlesen.cpp
00001 #include "mbed.h" 00002 #include "C12832_lcd.h" 00003 00004 //Poti1 und Poti2 extra einlesen ud auf 2 Zeilen am Display ausgeben 00005 //Poti1 hat die höchstmögliche Abtastfrequenz (sampletime) 00006 //Poti2 hat eine sehr niedrige Abtastfrequenz 00007 00008 AnalogIn pot1(p19); 00009 AnalogIn pot2(p20); 00010 C12832_LCD lcd; 00011 Ticker t1, t2; 00012 bool updateLcd = true; 00013 00014 00015 void Pot1() 00016 { 00017 lcd.locate(0,5); 00018 lcd.printf("Port 1: %f ",pot1.read()); 00019 } 00020 00021 void Pot2() 00022 { 00023 lcd.locate(0,15); 00024 lcd.printf("Port 2: %u ",pot2.read_u16()); 00025 } 00026 00027 00028 int main() { 00029 00030 lcd.cls(); 00031 00032 t1.attach(&Pot1, 1.00); 00033 t2.attach(&Pot2, 0.10); 00034 00035 while(1) 00036 { 00037 if (updateLcd) 00038 updateLcd = false; 00039 00040 00041 00042 00043 } 00044 }
Generated on Fri Jul 15 2022 01:41:16 by
1.7.2