Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 110:e80444a6fe3a
- Parent:
- 109:86a37f0a397f
diff -r 86a37f0a397f -r e80444a6fe3a main.cpp
--- a/main.cpp Tue Oct 05 05:00:06 2021 +0000
+++ b/main.cpp Tue Oct 05 13:18:23 2021 +0000
@@ -1,5 +1,5 @@
/*
- Project: Binary Counter Improved (while loop) Version
+ Project: 21_BC_Improved_v5 (Improved Binary Counter (while loop) Version)
File: main.cpp
Displays 8-bit binary count on bar graph display. This version uses a while
@@ -11,12 +11,12 @@
ambiguous name error.
Written by: Dr. C. S. Tritt
- Created: 9/27/21 (v. 1.0)
+ Created: 10/5/21 (v. 1.1)
*/
#include "mbed.h"
DigitalIn uB(USER_BUTTON); // Button is active low (up = 1, down = 0).
-const int bits = 4; // Number of bits to use.
+const int bits = 8; // Number of bits to use.
const int c_max = pow(2, bits) - 1; // Maximum count. pow is type double.
const int sleepTime = 100; // Sleep time in milliseconds.
int myCount = 0; // Count to be displayed. Loop counter.