Hi hab scho wieder a Problem mit dem Code:
Code:
Sub Rnb_servo(byval Servonummer As Byte , Byval Go_to_pos As Byte)
Local Schritt As Integer
Local Repeat_counter As Integer
If Curr_pos < Go_to_pos Then
Schritt = 1
Else
Schritt = -1
End If
For Curr_pos = Curr_pos To Go_to_pos Step Schritt
Open "comd.7:9600,8,n,1" For Output As #2
Print #2 , "#s" ; Chr(servonummer) ; Chr(curr_pos)
Close #2
Print Curr_pos
Waitms 10
Next
End Sub
Ich kann für die Variable Go_to_pos nur werte zwischen 1 und 254 eingeben. Is da irgendwo a Denkfehler drin, den ich net find? Man, ich auch gar nix richtig
Lesezeichen