3.11.2016.
Dependencies: mbed
main.cpp
- Committer:
- MatijaCecic
- Date:
- 2016-11-03
- Revision:
- 0:d79539b8abe1
File content as of revision 0:d79539b8abe1:
//Reads input through the ADC, and transfers to PC terminal #include "mbed.h" Serial pc(USBTX, USBRX); AnalogIn Ain(p20); float ADCdata, Voltage; int main() { pc.printf("ADC Data Values... \n\r"); while (1) { ADCdata=Ain; Voltage=ADCdata*3.3; pc.printf("Ulazni napon = %0.3f V \n\r",Voltage); wait (0.5); } }