vježba

Dependencies:   mbed

Fork of mbed_proba4 by Josip Novosel

main.cpp

Committer:
jnovosel
Date:
2016-11-03
Revision:
0:6c5ab92f9d12

File content as of revision 0:6c5ab92f9d12:

//Reads input through the ADC, and transfers to PC terminal
#include "mbed.h"
Serial pc(USBTX, USBRX);
AnalogIn Ain(p20);
float ADCdata;
int main()
{
    pc.printf("ADC Data Values... \n\r");
    while (1) {
        ADCdata=Ain*3.3;
        pc.printf("Ulazni napon = %.2f V\n\r",ADCdata);
        wait (0.5);
    }
}