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.
main.cpp
00001 /* Program Example 6.5: main.cpp file for modular 7-seg keyboard controller 00002 00003 This example program includes example code PE6.06, PE6.07, PE6.08, PE6.09 00004 */ 00005 #include "mbed.h" 00006 #include "HostIO.h" 00007 #include "SegDisplay.h" 00008 char data1, data2; // variable declarations 00009 00010 int main() { // main program 00011 SegInit(); // call init function 00012 HostInit(); // call init function 00013 while (1) { // infinite loop 00014 data2 = GetKeyInput(); // call to get 1st key press 00015 Seg2 = SegConvert(data2); // call to convert and output 00016 data1 = GetKeyInput(); // call to get 2nd key press 00017 Seg1 = SegConvert(data1); // call to convert and output 00018 pc.printf(" "); // display spaces on host 00019 } 00020 } 00021
Generated on Tue Jul 26 2022 08:34:23 by
1.7.2