
Hi everyone.
I was playing around with a joypad I have (not the one in the picture) with ARC, and was trying to configure some buttons to control servos and 2 drive motors running of an L298 H-bridge. I managed to do some test control scripts for the numbered buttons, but ran in to a little trouble with the direction pads. confused
A managed to get the two drive motors going forwards and reverse with no problems (2 motors connected to L298 for combined speed control), but I have a HD servo that controls the steering and I couldn't find a way to configure the left/right direction pads to control the servo.
Could one of you kind souls out there advise me on how to do this, (if indeed it is possable as that part of the config screen looks greyed out and seems unchangable), and also, what control pads are fully compatable with ARC? If I can get the drive/steering set up mentioned above working okay, I will get another joypad with more buttons and controls (like the one pictured above) to control the numerous servos I have installed in my bot.
As always, any help and advice would be great fully received.
Steve.
If I understand correctly, your direction pad will fall under one of these variable sets:
To use these, make a script which detects the variable which is triggered and have the servo move that direction. More info to come.
This is the script you'll need. Follow the instructions!
@technopro.
Thank you for your reply. I will give the script a try a little later. Also, I just want to see if I understand it correctly, the "vairables" screen can change the values of "joystick 1". Is that right, or am I way off?
Also, I forgot to ask this in my first post, the left and right finger trigger buttons on the top of the joypad (seen below), where can they be configured. Is it under buttons?
Cheers, Steve.
If you can press them, then they are buttons. You can hover your cursor over any blue question marks for Help in ARC. The question marks identify anything you can hover over for help. For example, if you hover over the blue question mark in the Buttons tab of the Joystick, you will be able to read it. Once you have read it, it will state that you can press the buttons on the joystick to see which buttons are for what code.
Pressing the button will highlight the row. Only buttons can be pressed, it won't highlight if you move the joystick part. The joystick and D Pad are not "buttons".
What you highlighted are buttons.
The blue help icons are everywhere in ARC. Move the mouse cursor and hover over the blue help icons. When you do that, a popup will display help about that object.
@Steve... All the buttons and joysticks are configured within the control.... Go to the tab on the top that says buttons.... You will see the list of joystick buttons and cmds you can configure when you push or release a button... As DJ stated in his above post... The ?'s throughout ARC will provide you with lots of additional valuable information... You will also notice when you push a button while configuring, the actual line will be highlighted in blue (so you know what line is associated with what button).... You can now edit scripts behind these lines so as to do what you want when a button is pushed/released...
@DJ and Richard.
Thanks for your replies and appreciate your response. I know about the "?" Help icons and have been using them all over the site along with the learn section, but for this instance I have not seen anything light up when I press the trigger buttons on the button list which is why I am asking about joypad comparability here.
On the subject of the D Pad controls, I know that they don't count as buttons, and what I was asking was if I can control the H-bridge motors for forwards and reverse, and configure the left/right controls to control a servo other to what @technopro has mentioned. I haven't seen any mention about configuring a joypad/stick this in the "?" Help pop ups to help me with this specific set up which again is why I am asking for help in the forum.
By default the left joystick should drive the Movement Panel as soon as you add the joystick control to your project... If it doesn't then the joystick isn't working (which means the button lines will not be highlighted in blue), not connected or is incompatible.... In the dropdown box of the joystick control should be the joystick that you are using (if it is connected and working that is)... If nothing is there then ARC does not see the joystick that you have attached to your PC....
You will need to have the Joystick selected before you can press the buttons to see the highlighted rows for each button.
Load ARC
Project -> Add Control from top menu
Select Misc Tab
Add Joystick
Select your joystick from the drop down in the Joystick Control
Press the GEAR on the Joystick control
Select the tab BUTTONS within the config window for the joystick control
you will see a blue ? button that you can put your cursor over. There is where you add the code for each button. You can press the button on the joystick to see which row highlights