Matej Tovornik / Mbed 2 deprecated A_Load_Cell

Dependencies:   mbed

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
    }
}