ejemplos varios

Dependencies:   mbed

descripcion o resumen

https://os.mbed.com/media/uploads/lscordovar/informe_3d_amnt0.jpg pie de la imagen con explicacion

practica desarrollo, etc

concluciones

main.cpp

Committer:
lscordovar
Date:
2020-02-06
Revision:
0:16fd5df34260

File content as of revision 0:16fd5df34260:

//Reads input through the ADC, and transfers to PC terminal
#include "mbed.h"
Serial pc(PA_2,PA_3);;
AnalogIn Ain(PB_0);

float ADCdata;

int main()
{
    pc.printf("ADC Data Values... \n\r");
    while (1) {
        ADCdata=Ain;
        pc.printf("%f \n\r",ADCdata);
        wait (0.5);
    }
}

/*

#include "mbed.h"
int main()
{
    AnalogOut Aout(p18);
    while(1) {
        Aout=0.25; // 0.25*3.3V = 0.825V
        wait(1);
        Aout=0.5; // 0.5*3.3V = 1.65V
        wait(1);
        Aout=0.75; // 0.75*3.3V = 2.475V
        wait(1);
    }
}
*/

/*
//Sawtooth waveform on DAC output to view on oscilloscope
#include "mbed.h"
AnalogOut Aout(p18);
float i;
int main()
{
    while(1) {
        for (i=0; i<1; i=i+0.1) {
            Aout=i;
            wait(0.001);
        }
    }
}
*/