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.
Fork of Nightlight3 by
Diff: main.cpp
- Revision:
- 7:52ed5fbb1208
- Parent:
- 6:0c1ab2c11252
- Child:
- 8:2be3e2339203
--- a/main.cpp Wed Sep 13 10:32:11 2017 +0000
+++ b/main.cpp Wed Nov 01 20:05:22 2017 +0000
@@ -5,20 +5,20 @@
Displays 4 bit binary count on bar graph display.
Written by: Dr. C. S. Tritt
- Created: 9/13/17 (v. 1.0)
+ Created: 9/13/17 (v. 1.1)
*/
#include "mbed.h"
-BusOut barGraph(D5, D4, D3, D2); // Create barGraph BusOut object.
+BusOut barGraph(D2, D3, D4, D5); // Create barGraph BusOut object.
DigitalOut pinD7(D7); // Needed to force this pin off.
int main() {
- printf("Binary count example\n"); // ID software.
+ printf("Binary Count Example\n"); // ID software.
- pinD7 = 0; // Force pin D7 off. This shouldn't be necessary.
+ pinD7 = 0; // Force pin D7 off.
- barGraph = 0; // Light top bar.
+ barGraph = 0; // Start with all bars off.
while(true) {
barGraph = barGraph + 1; // Add one to count.
wait(1.0);
