Hi
I have a problem with running script after i disconect pololu maestro 6Ch from usb. There are 3 servos connected, plus one button. I wrote script that moves 3 servos in proper order to specified positions after i press button once. After second button press servos are moving to starting position in proper order. The problem is, its working fine when its connected to computer via usb port.
When i disconect it from computer and press button once - sequence is started - servos moving in order to open position. When button is pressed second time nothing happend. I cant make my pololu move servos to starting position.
So my idea was - that is problem with power. When Pololu is powered from 2 spots its working - if its only one its not. I checked power lines ( 12v battery 5000mAh fully charged -> device that gives 2A 5.5V -> pololu maestro ) but even when servos are moving there is still 5.5 V , no drops.
I can of course add another 5V line and plug it into usb port but its not solving , its avoiding problem …
Script looks like this :
[code]1 #ustawia stan na zamknieta baza
begin
0 get_position
1 less_than #Check if button is pushed
if
dup
if #If baza zamknieta, run frame to open it
otworz_baze #Run the otworz_baze subroutine
drop #Change the state to 0
0
else #If baza otwarta, run frame to close it
zamknij_baze #Run zamknij_baze subroutine
drop #Change the state to 1
1
endif
endif
repeat
otworz_baze
sub otworz_baze
500 0 0 0 5568 6075 frame_1…5 # zamknieta baza
500 8943 frame_4 # otwarte prawe
1500 delay
500 2580 frame_5 # otwarta antena
1500 delay
500 7484 5633 1725 frame_3…5 # zamkniete prawe
500 4246 frame_3 # otwarta baza
500 delay
return
zamknij_baze
sub zamknij_baze
500 0 0 0 8865 2580 frame_1…5 # otwarte prawe
1500 delay
500 5928 frame_5 # zamknij antene
1500 delay
500 5659 frame_4 # zamknij prawe
500 7484 frame_3 # zamknieta baza
500 delay
return
Sequence subroutines:
sub frame_1…5
5 servo
4 servo
3 servo
2 servo
1 servo
delay
return
sub frame_4
4 servo
delay
return
sub frame_5
5 servo
delay
return
sub frame_3…5
5 servo
4 servo
3 servo
delay
return
sub frame_3
3 servo
delay
return[/code]
Can You plz help me to find solution …