Hauptmenü

heisser draht mit attiny 44 sieben segmentanzeige



int fehler = 0 ; void setup() { pinMode( 7 , INPUT); pinMode( 9 , OUTPUT); pinMode( 10 , OUTPUT); pinMode( 0 , OUTPUT); pinMode( 1 , OUTPUT); pinMode( 2 , OUTPUT); pinMode( 3 , OUTPUT); pinMode( 4 , OUTPUT); pinMode( 5 , OUTPUT); pinMode( 6 , OUTPUT); fehler = 0 ; } void loop() { if ( digitalRead( 7)) { fehler = ( fehler + 1 ) ; delay( 5 ); digitalWrite( 9 , HIGH ); digitalWrite( 10 , HIGH ); delay( 1000 ); digitalWrite( 9 , LOW ); digitalWrite( 10 , LOW ); } if (( ( fehler ) == ( 0 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 1 ) )) { digitalWrite( 0 , HIGH ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , HIGH ); delay( 5 ); } if (( ( fehler ) == ( 2 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , HIGH ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 3 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 4 ) )) { digitalWrite( 0 , HIGH ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , LOW ); digitalWrite( 6 , HIGH ); delay( 5 ); } if (( ( fehler ) == ( 5 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , HIGH ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 6 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , HIGH ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 7 ) )) { digitalWrite( 0 , HIGH ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 8 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 9 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 10 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 5 ); VAR_1_fehler = 0 ; digitalWrite( 9 , HIGH ); digitalWrite( 10 , HIGH ); delay( 3000 ); digitalWrite( 9 , LOW ); digitalWrite( 10 , LOW ); } }