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.
Diff: main.cpp
- Revision:
- 0:763f10757892
- Child:
- 1:315ff90b5e39
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 13 08:49:14 2021 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" + +Serial pc(SERIAL_TX, SERIAL_RX); + +AnalogIn analog_value(A0); + +DigitalOut led(LED1); + +float ADC_Value; +float Teza; + + + +int main() +{ + + + + while(1) { + + ADC_Value = analog_value.read(); // Read the analog input value (value from 0.0 to 1.0 = full ADC conversion range) + + + // Display values + pc.printf("%f\n\r", ADC_Value); + + wait(1.0); // 1 second + } +} \ No newline at end of file