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 00003 AnalogIn analog_value(A0); 00004 DigitalOut led(LED1); 00005 00006 00007 int main() { 00008 float meas; 00009 00010 printf("\nAnalogIn example\n"); 00011 00012 while(1) { 00013 meas = analog_value.read(); // Converts and read the analog input value (value from 0.0 to 1.0) 00014 //meas = meas * 3300; // Change the value to be in the 0 to 3300 range 00015 meas = meas * 5000; // Change the value to be in the 0 to 3300 range 00016 printf("%.0f mV\n", meas); 00017 wait(1); 00018 } 00019 }
Generated on Wed Jul 20 2022 23:38:38 by
