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: mbed
main.cpp
00001 #include "mbed.h" 00002 00003 AnalogIn analog_value(dp13); 00004 PwmOut led(dp24); 00005 00006 int main(void) { 00007 float meas, temp; 00008 printf("\r\nAnalogIn example\r\n"); 00009 00010 while(1) { 00011 meas= analog_value.read(); 00012 meas=meas*3300; 00013 temp=0.1*meas-50; 00014 printf("measure = %.0f mV, temp = %.1f C\r\n",meas,temp); 00015 00016 00017 if(temp>25.0){ 00018 led.write(1.0); 00019 } 00020 else{ 00021 led.write(0.0); 00022 } 00023 00024 wait(1.0); 00025 } 00026 } 00027
Generated on Tue Jul 12 2022 21:41:57 by
1.7.2