IT Tralee Life Long Learning 2020 Instrumentation, Monitoring and Control Module Laboratory Session

Dependencies:   mbed C12832

Files at this revision

API Documentation at this revision

Comitter:
alejandromontes
Date:
Mon Jul 27 20:30:21 2020 +0000
Commit message:
Alejandro Montes Instrumentation Monitoring and Control LAB

Changed in this revision

C12832.lib Show annotated file Show diff for this revision Revisions of this file
LAB_2.4.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
diff -r 000000000000 -r fa653a534c74 C12832.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832.lib	Mon Jul 27 20:30:21 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/chris/code/C12832/#7de323fa46fe
diff -r 000000000000 -r fa653a534c74 LAB_2.4.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LAB_2.4.cpp	Mon Jul 27 20:30:21 2020 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+DigitalIn fire(p14);
+PwmOut spkr(p26);
+AnalogIn pot1(p19);
+float start=2000.0;
+float end=10000.0;
+float step=200.0;
+
+int main(){
+    while (1) {
+        for (float i=start; i<end; i+=step) {
+        spkr.period(5.0/i);
+        spkr=(0.5);
+        wait(0.1);
+        }
+    spkr=0.0;
+    start=8000.0;
+    while(pot1.read() < 0.5) {} // this uses the pot1 to control the program
+    }
+}
diff -r 000000000000 -r fa653a534c74 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jul 27 20:30:21 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file