1
Dependencies: mbed
main.cpp
00001 //Uhr 00002 #include "mbed.h" 00003 00004 BusOut sek(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3); 00005 BusOut min(P1_1,P1_0,LED4,LED3,LED2,LED1); 00006 InterruptIn sw2(P0_10); 00007 InterruptIn sw1(P0_15); 00008 bool start = false; 00009 00010 void push1() // Interruptfunktion push1 00011 { 00012 00013 } 00014 void push2() // Interruptfunktion push2 00015 { 00016 start = true; 00017 } 00018 00019 int main() { 00020 int i = 0; 00021 int j = 0; 00022 sw2.rise(&push1); 00023 sw1.rise(&push2); 00024 while(1) 00025 { 00026 if(start == true) 00027 { 00028 while(i<60) 00029 { 00030 i++; 00031 sek = i; 00032 wait(1); 00033 } 00034 if(i == 60) 00035 { 00036 j++; 00037 min = j; 00038 } 00039 } 00040 } 00041 }
Generated on Tue Aug 23 2022 06:58:11 by
1.7.2