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 // A simple sample to use TextLCD and LM35 temeperature sensor 00002 00003 #include "mbed.h" 00004 #include "TextLCD.h" 00005 00006 AnalogIn ain(p20); 00007 TextLCD lcd(p24, p25, p26, p27, p28, p29); // rs, e, d0-d3 00008 00009 int main() { 00010 float ondo; 00011 lcd.printf("Ondokei\n"); 00012 00013 while (1) { 00014 ondo = 0; 00015 00016 for ( int i = 0; i < 100; i++ ) { 00017 ondo += ain; 00018 wait(0.01); 00019 } 00020 00021 printf( "%f\r\n", ondo * 3.3 ); 00022 lcd.locate( 3, 1 ); 00023 lcd.printf( "ondo =%5.1f%cC", ondo * 3.3, 0xDF ); 00024 } 00025 }
Generated on Tue Jul 12 2022 23:22:46 by
1.7.2