Das ist jetzt ein bisschen ausführlicher, aber nun zeigt er mir 3 Fehler bezogen auf "Modus" an.
Code:$regfile = "attiny13.dat" $crystal = 1200000 $hwstack = 0 $swstack = 0 $framesize = 0 Config Portb.1 = Output Config Portb.2 = Output Config Portb.3 = Output Config Portb.4 = Output Config Pinb.0 = Input do If Pinb.0 = 1 Then Incr Modus If Modus > AnzahlModi then Modus=1 Select Case Modus Case 1 Gosub Lichteffekt1 Case 2 Gosub Lichteffekt2 end select loop end Lichteffekt1: Portb.1 = 1 Portb.2 = 0 Portb.3 = 1 Portb.4 = 0 Waitms 100 Portb.3 = 0 Portb.4 = 1 Waitms 100 Portb.3 = 1 Portb.4 = 0 Waitms 100 Portb.1 = 0 Portb.2 = 1 Portb.3 = 0 Portb.4 = 1 Waitms 100 Portb.3 = 1 Portb.4 = 0 Waitms 100 Portb.3 = 0 Portb.4 = 1 Waitms 100 return Licheffekt2: Portb.1 = 1 Portb.2 = 1 Portb.3 = 1 Portb.4 = 1 Waitms 100 Portb.1 = 0 Portb.2 = 0 Portb.3 = 0 Portb.4 = 0 Waitms 100 return







Zitieren
Lesezeichen