Karla Garcia
/
ejercicio3_p6
.
main.cpp
- Committer:
- karlaivon
- Date:
- 2020-06-01
- Revision:
- 0:749d5b4ae650
File content as of revision 0:749d5b4ae650:
#include "mbed.h" #include "C12832.h" C12832 lcd(SPI_MOSI, SPI_SCK, SPI_MISO, p8, p11); AnalogIn Ain(p15); float ADCdata, voltaje; int main () { while (1) { ADCdata= Ain.read_u16(); lcd.locate(0,3); lcd.printf("R: %f", ADCdata); voltaje= (ADCdata*5/1024); lcd.locate(0,16); lcd.printf("V: %f", voltaje); printf("V: %f", ADCdata); wait(0.5); } }