So habs, allerdings gehen die Servos am Anfang immer auf vollen Ausschlag nach Links.. bei mir der Boden, was mch ich falsch?
Code:
$regfile = "m16def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 16000000
Wait 1
Config Servos = 2 , Servo1 = Portb.3 , Servo2 = Portb.4 , Reload = 7
Config Portb = Output
Config Porta.7 = Input
Porta.7 = 1
Enable Interrupts
Wait 2
Do
If Pina.7 = 0 Then
Servo(1) = 160
Waitms 500
Servo(2) = 230
Waitms 500
Servo(1) = 110
Servo(2) = 190
End If
Loop
Mfg
Lenox
Lesezeichen