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 BinaryCount by
main.cpp
00001 /* 00002 Project: FlexiBarDemo 00003 File: main.cpp 00004 00005 Test harness for flexiBar bar graph display function. 00006 00007 Written by: Dr. C. S. Tritt 00008 Created: 9/13/17 (v. 1.0) 00009 */ 00010 #include "mbed.h" 00011 #include <flexiBar.h> 00012 00013 // Create 10-bit BusOut object called barGraph. 00014 BusOut barGraph(D11, D10, D9, D8, D7, D6, D5, D4, D3, D2); 00015 00016 int main() { 00017 00018 printf("flexiBar Test Harness\n"); // ID software. 00019 00020 // Start by directly testing the display. 00021 barGraph = 0b1111111111; // Light all bars. 00022 wait(2.0); 00023 barGraph = 0; // All bars off. 00024 wait(2.0); 00025 00026 // Loop through all values in both modes. 00027 while(true) { 00028 bool single = true; 00029 for (int n = 0; n <= 9; n++) { 00030 flexiBar(n, barGraph, single, true); 00031 wait(1.0); 00032 } 00033 single = false; 00034 for (int n = 0; n <= 9; n++) { 00035 flexiBar(n, barGraph, single, true); 00036 wait(1.0); 00037 } 00038 // Test the special case of all bars off. Third argument is ignored. 00039 flexiBar(-1, barGraph, false, true); 00040 wait(2.0); 00041 } 00042 }
Generated on Wed Jul 20 2022 09:36:10 by
1.7.2
