Displays 4 bit binary count on bar graph display. Demonstrates BusOut usage.

Dependencies:   mbed

Fork of Nightlight3 by Charles Tritt

Files at this revision

API Documentation at this revision

Comitter:
CSTritt
Date:
Fri Nov 03 14:11:19 2017 +0000
Parent:
7:52ed5fbb1208
Commit message:
Fixed location of wait.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 52ed5fbb1208 -r 2be3e2339203 main.cpp
--- a/main.cpp	Wed Nov 01 20:05:22 2017 +0000
+++ b/main.cpp	Fri Nov 03 14:11:19 2017 +0000
@@ -20,8 +20,8 @@
     
     barGraph = 0;  // Start with all bars off.
     while(true) {
+        wait(1.0);
         barGraph = barGraph + 1; // Add one to count.
-        wait(1.0);
         if (barGraph == 15) {
             barGraph = 0;
         }