Speaker_3

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
jforde
Date:
Tue Jul 28 11:58:31 2020 +0000
Parent:
0:4a38049f8bdd
Commit message:
Speaker_3

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Jun 20 11:58:53 2020 +0000
+++ b/main.cpp	Tue Jul 28 11:58:31 2020 +0000
@@ -1,13 +1,13 @@
-#include "mbed.h"
+#include "mbed.h"                              //Preprocessor Directives 
 
-DigitalIn fire(p14);
+DigitalIn fire(p14);                            // Declarations 
 PwmOut spkr(p26);
 AnalogIn pot1(p19);
 float start=2000.0;
 float end=10000.0;
 float step=200.0;
 
-int main(){
+int main(){                                      //instructions in main () function 
     while (1) {
         for (float i=start; i<end; i+=step) {
         spkr.period(5.0/i);