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 #include "mbed.h" 00002 00003 BusOut binaryOutput(D5, D6, D7); 00004 00005 /* 00006 *************************************************** 00007 Solution - use the post-decrement operator on iCount 00008 *************************************************** 00009 */ 00010 00011 int main() { 00012 00013 int iCount = 7; 00014 00015 //Repeat this program forever 00016 while(1) { 00017 00018 do { 00019 binaryOutput = iCount--; //Write decimal to the output and decrement 00020 wait(1.00); //Delay for 500ms 00021 } while (iCount >= 0); //Condition to repeat 00022 00023 //Reset the count 00024 iCount = 7; 00025 } 00026 }
Generated on Thu Jul 14 2022 05:52:35 by
1.7.2