FOXBAJA / Mbed 2 deprecated VLK_091

Dependencies:   mbed

main.cpp

Committer:
rafaelff3
Date:
2021-02-22
Revision:
1:adcde9f41a67
Parent:
0:9b9b318a5f0d

File content as of revision 1:adcde9f41a67:

#include "mbed.h"

AnalogIn freio (A0);

float sinal = 0;
float pressao = 0;

int main()
{
    while(1){
        sinal = freio.read(); // Leitura vai de 0.2 (0 bar) a 1 (10 bar)
        pressao = (sinal - 0.2)/0.8*10
    }
}