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
- Committer:
- MatTov
- Date:
- 2022-04-04
- Revision:
- 1:315ff90b5e39
- Parent:
- 0:763f10757892
File content as of revision 1:315ff90b5e39:
#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)
ADC_Value = ADC_Value*3.3;
// Display values
pc.printf("%f\n\r", ADC_Value);
//pc.printf("%f\n\r", Teza);
wait(1.0); // 1 second
}
}