asdasd

Dependencies:   mbed

main.cpp

Committer:
dimmu8410
Date:
2018-07-06
Revision:
0:4a8f4d6bcc13

File content as of revision 0:4a8f4d6bcc13:

#include "BCDSEG.h"

Serial pc(USBTX,USBRX);
AnalogIn pot(A0);
int unic,decc;
float voltage;
int main() {
    anodo leidy;
    leidy.visual(D6,D7,D8,D9,D10,D11,D12);// EN EL DISPLAY EL ORDEN ES (G,F,E,D,C,B,A);
    while(1) 
    {
           voltage=pot.read_u16()*0.00005;
           //pc.printf("la lectura: %0.2f\r", voltage);
           //wait(0.5);
           decc=voltage;
           unic=(voltage*10)-(decc*10);    
           leidy.dual(D4,D5,unic,decc,50);
       
    }
          
}