First laboratory uses each of the five routines with your modifications. These routines illustrate digital output, PWM output, and Analog input and output.

Files at this revision

API Documentation at this revision

Comitter:
billcooke51
Date:
Tue Oct 02 18:39:20 2018 +0000
Parent:
69:9c1bb616a393
Commit message:
Resubmission

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 9c1bb616a393 -r 6699d1be31ca main.cpp
--- a/main.cpp	Mon Oct 01 11:38:41 2018 +0000
+++ b/main.cpp	Tue Oct 02 18:39:20 2018 +0000
@@ -4,7 +4,7 @@
 // /* to // and */ to // to make a program active
 
 // PROGRAM #1
-/*
+//
 // This controls two digital out lines connected to LEDs
 // and two others that go outon pins 21 and 22
 // The program alternates these lines with a 2 second delay;
@@ -19,13 +19,13 @@
   while(1){
     led1 = valOut;
     d1 = valOut;
-    led2 = !valOut;
+    led2 = !valOut
     d2 = !valOut;
     valOut = !valOut;
     wait(2.);  // wait 2 seconds. Use wait_ms or wait_us using integers of milli or micro seconds
   }
 }
-*/
+//
 
 // PROGRAM #2
 /*
@@ -85,11 +85,11 @@
 */
 
 
-
+/*
 // PROGRAM #5
-
+//
 // This program reads an analog voltage and 
-// echoes it outon the analog output line
+// echoes it out on the analog output line
 AnalogOut aout(p18);
 AnalogIn ain(p20);
 float volts;
@@ -100,3 +100,4 @@
         aout = volts/VCC;
     }
  }
+*/
\ No newline at end of file