
Zitat von
KrosseKrabbe
Damit meine ich einfach das ich den Wert im programm einfach live änder. Der uC ist ja aufm STK500 verbaut da geht ja soweit ich weiß sowas.
Im Prizip brauchst Du nur die entsprechenden PWM Werte für rechts,links, mitte per z.B. Hyperterm oder ähnlich zum µC senden und in das PWM Register schreiben.
Es gibt auch PC Programme mit denen eine Fernsteuerung simuliert werden kann oder man greift auf z.B. so etwas zurück http://www.shop.robotikhardware.de/s...a9ce059e8c6063
Code:
'Config Servos = 2 , Servo1 = Portb.0 , Servo2 = Portb.1 , Reload = 10
$regfile = "2313def.dat"
Config Servos = 1 , Servo1 = Portb.0 , Reload = 10
'as an option you can use TIMER1
'Config Servos = 2 , Servo1 = Portb.0 , Servo2 = Portb.1 , Reload = 10 , Timer = Timer1
'we use 2 Servos with 10 uS resolution(steps)
'we must configure the port pins used to act as output
Config Portb = Output
'finally we must turn on the global interrupt
Enable Interrupts
'the servo() array is created automatic. You can used it to set the
'time the servo must be on
Servo(1) = 10 '10 times 10 = 100 uS on
'Servo(2) = 20 '20 times 10 = 200 uS on
Do
Loop
Dim I As Byte
Do
For I = 0 To 100
Servo(1) = I
Waitms 1000
Next
For I = 100 To 0 Step -1
' Servo(1) = I
Waitms 1000
Next
Loop
End
Gruß Richard
Lesezeichen