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

Files at this revision

API Documentation at this revision

Comitter:
lscordovar
Date:
Thu Feb 06 23:52:17 2020 +0000
Commit message:
Ejemplo de lectura analogica

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Feb 06 23:52:17 2020 +0000
@@ -0,0 +1,49 @@
+//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);
+        }
+    }
+}
+*/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Feb 06 23:52:17 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file