Asked — Edited

Joystick/Movement Panel Question

So I am puzzled... I have my Movement Panel working and it works fine using arrow keys ... But when I use the joystick I can see the GU lighting up in corespondece with joystick movent and the Movement Panel GU even lights up same as if I was using the arrow keys... Only difference is nothing happens with robot.. but again if I put joystick down and hit arrow keys the bot will move. ? Note: that sometimes within same instance periodically I will get movement from bot with joystick but that is only temp.. What puzzles me the most is I could see trouble shooting it if when the joystick is used nothing happens on the GU... But everything is lighting up


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

#9  

Are you using a UART port in your project... I just tested my joystick again and it had nothing to do with the analog button being pressed or not.... In my Movement Panel when using forward it seems my bot would not go forward if I was using either UART send or receive calls at the same time (haven't determined which one might be causing the problem)... My program calls another script within forward movement command... This script is used to monitor sensors as the bot moved forward. Inside this script is a few uart read and writes... My joystick would only move my bot forward if I removed the call to run the sensor script... However, using the keyboard and directly clicking the Movement Panel everything worked perfectly....

PRO
Synthiam
#10  

Can you share your project?

#11  

I cant share it at the moment since I am not home and it is not in the cloud ( i know bad me.. I will not let that happen again)

But the code that is running in relation to that stuff is Rich's sabertooth ramp code and the joystick panel in ARC. ( I know that really does not help but it is all I can say right now tired ) I will upload my project when I get home however:)

United Kingdom
#12  

Which parts of my speed ramping project did you merge in to the project? And have you changed anything?

In my project I added two graphs (so I could test it without the sabertooth), do these show the speed values changing when using the joystick? (Sorry, I can't view the video right now).

I think we will need to check the project out so if you can, when you get home post the project and we will have a look and figure it out.

#13  

one last thing I did note if it is of any issue.. is that sometimes I have to double tap the arrow key on Movement Panel to get it to engage correctly... otherwise at times it will not engage the other motor...just one motor will move forward for example.

United Kingdom
#14  

@RichardR, is there any kind of initiation for the sabertooth to make it work as it should? I kind of recall you mentioning something needed to be done first before something else would work as it should but it's so vague I have no idea what it was, or even if it was real or a dream!:)

#15  

@DJ is $speed a reserved variable used with the joystick control? Because I used it for something else with other scripts in the same project... Could be what was causing my issues... When I have time later today I will change my $speed variable to another name and see if that makes any difference...

PRO
Synthiam
#16  

$speed is not a reserved variable