Nabend,
gibt es ein Beispiel wie ich mit dem Minicontrol einen der fertigen Servo Steckplätze benutze?
MfG
Scarabol
Nabend,
gibt es ein Beispiel wie ich mit dem Minicontrol einen der fertigen Servo Steckplätze benutze?
MfG
Scarabol
C oder Basic?
http://www.rn-wissen.de/index.php/Servo
Ich verwende Bascom als denke ich wohl das es Basic ist.
Hier ist mein Programm:
Allerdings fährt das Servo in Endlage und zittert dann nur noch...Code:$regfile = "m168def.dat" $crystal = 16000000 'Quarzfrequenz $baud = 9600 $hwstack = 32 $framesize = 32 $swstack = 32 Dim Center11 As Byte Dim Center21 As Byte Dim Pos11 As Byte Dim Pos21 As Byte Center11 = 105 Pos11 = 5 Center21 = 125 Pos21 = 20 'Servo config Config Servos = 1 , Servo1 = Portc.1 , Reload = 10 Config Portc = Output 'finally we must turn on the global interrupt Enable Interrupts 'ende Servo config Do ' Print "center" ' Servo(1) = Center11 ' Waitms 1000 Print "pos1" Servo(1) = Pos11 Wait 1000 ' Print "center" ' Servo(1) = Center11 ' Wait 1000 Print "pos2" Servo(1) = Pos21 Wait 1000 Loop
MfG
Scarabol
Ja das ist oft so das Servos in Endlage egal ob links oder rechts rum zittern.
Fahr einfach bis kurz vor die Endlage.
Wozu ist das Enable Interrupts?
MfG
Scarabol
Ich kenn mich mit Bascom nicht aus, aber eventuell muss es an der Stelle eingeschaltet werden, damit ein Timer gestartet wird über den die Signallänge erzeugt wird
Danke für die schnelle Hilfe, mein Servo funktioniert jetzt.
Hier nochmal mein Programm:
Als Servo verwende ich das "TOP-LINE STANDARD SERVO RS 2 JR" von conrad.deCode:$regfile = "m168def.dat" $crystal = 16000000 'Quarzfrequenz $baud = 9600 $hwstack = 32 $framesize = 32 $swstack = 32 Dim Center11 As Byte Dim Center21 As Byte Dim Pos11 As Byte Dim Pos21 As Byte Center11 = 20 Pos11 = 50 Center21 = 210 Pos21 = 190 'Servo config Config Servos = 1 , Servo1 = Portc.1 , Reload = 10 Config Portc = Output 'finally we must turn on the global interrupt Enable Interrupts 'ende Servo config Do ' Print "center" ' Servo(1) = Center11 ' Waitms 1000 Print "pos1" Servo(1) = Pos11 Waitms 1000 ' Print "center" ' Servo(1) = Center11 ' Wait 1000 Print "pos2" Servo(1) = Pos21 Waitms 1000 Loop
Bei dem Servo ist:
orange = Port / Signal
rot = 5V
schwarz = GND
MfG
Scarabol
Versuche anstatt 20,50 und 210 mal 80, 100 und 120.
Mit meinem RN-Mega2560 bin ich bei deinen Werten voll am Anschlag.
mfg
Stefan
Hi,
kann ich die Servos auch ohne Enable Interupts ansteuern?
Ich benutze gleichzeitig eine serielle Verbindung um die Positionen für das Servo zu übermitteln, aber irgendwie kommen die sich wohl in die Quere...
MfG
Scarabol
Lesezeichen