Frank Girald
/
ADCserialTX
Conversor ADC to RS232
main.cpp
- Committer:
- franni
- Date:
- 2019-09-16
- Revision:
- 1:8d0067d6d183
- Parent:
- 0:a942d6b61747
File content as of revision 1:8d0067d6d183:
#include "mbed.h" float temperatura, valor_adc; AnalogIn lm35 (A0); Serial rs232(USBTX, USBRX); //enable serial port which links to USB int main() { rs232.baud(9600); while(1){ valor_adc = lm35; temperatura= (valor_adc*3300/10); rs232.printf("%1.2f \n\r",temperatura); wait(0.2); } }