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 "TextLCD.h" 00003 TextLCD lcd(p24, p25, p26, p27, p28, p29, p30); // rs, rw, e, d0, d1, d2, d3 00004 AnalogOut signal(p18); 00005 00006 float ff; 00007 float pi; 00008 float theta; 00009 00010 00011 int main() { 00012 pi = 3.142; 00013 00014 while (1) { 00015 theta=0; 00016 for( int i=0; i < 63; i++ ) { 00017 theta+=0.1; 00018 ff = 0.5*sin(theta)+0.5; 00019 signal=ff; 00020 lcd.locate (0,0); 00021 lcd.printf("%.2f", ff); 00022 wait(0.001); 00023 } 00024 } 00025 }
Generated on Tue Aug 2 2022 14:18:09 by
1.7.2