3.11.2016.
Dependencies: mbed
main.cpp
00001 //Reads input through the ADC, and transfers to PC terminal 00002 #include "mbed.h" 00003 Serial pc(USBTX, USBRX); 00004 AnalogIn Ain(p20); 00005 float ADCdata, Voltage; 00006 int main() 00007 { 00008 pc.printf("ADC Data Values... \n\r"); 00009 while (1) { 00010 ADCdata=Ain; 00011 Voltage=ADCdata*3.3; 00012 pc.printf("Ulazni napon = %0.3f V \n\r",Voltage); 00013 wait (0.5); 00014 } 00015 }
Generated on Tue Jul 26 2022 05:51:05 by
1.7.2