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 DigitalOut datapin(D8); 00004 DigitalOut latchpin(D9); 00005 DigitalOut clockpin(D10); 00006 00007 int main() { 00008 const int number[10][8]= { 00009 { 0, 1, 1, 1, 1, 1, 1}, // 0 00010 { 0, 0, 0, 0, 1, 1, 0}, // 1 00011 { 1, 0, 1, 1, 0, 1, 1}, // 2 00012 { 1, 0, 0, 1, 1, 1, 1}, // 3 00013 { 1, 1, 0, 0, 1, 1, 0}, // 4 00014 { 1, 1, 0, 1, 1, 0, 1}, // 5 00015 { 1, 1, 1, 1, 1, 0, 0}, // 6 00016 { 0, 0, 0, 0, 1, 1, 1}, // 7 00017 { 1, 1, 1, 1, 1, 1, 1}, // 8 00018 { 1, 1, 0, 0, 1, 1, 1} // 9 00019 00020 }; 00021 while(1) 00022 00023 { 00024 for(int j=0;j<=9;j++) 00025 { 00026 latchpin=0; 00027 00028 for(int i=0;i<=7;i++) 00029 { 00030 datapin=number[j][i]; 00031 clockpin=1; 00032 clockpin=0; 00033 } 00034 latchpin=1; 00035 wait(0.5); 00036 } 00037 00038 00039 } 00040 }
Generated on Mon Jul 25 2022 21:46:04 by
1.7.2