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 #define dp23 P0_0 00003 00004 00005 00006 00007 DigitalOut enable(dp14); 00008 00009 00010 00011 BusOut bus (dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28); 00012 00013 DigitalIn ulaz(dp1); 00014 00015 00016 int main() { 00017 enable=0; 00018 00019 while(1) 00020 { 00021 00022 bool istina=false; 00023 bus=0; 00024 00025 for(int i=0;i<128;i++) 00026 { 00027 bus=i; 00028 wait(1); 00029 00030 if(ulaz==1) 00031 { 00032 int j=i; 00033 for(j=i;j>0;j--) 00034 { 00035 bus=j; 00036 wait(1); 00037 if(j==0) 00038 { 00039 istina=true; 00040 i=0; 00041 } 00042 } 00043 if(istina) break; 00044 00045 } 00046 if(istina) break; 00047 00048 00049 } 00050 } 00051 }
Generated on Mon Jul 18 2022 09:19:43 by
1.7.2