
Hi everyone.
I was playing around with a joypad I have (not the one in the picture) with EZ-Builder, 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 EZ-Builder? 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.
To use these, make a script which detects the variable which is triggered and have the servo move that direction. More info to come.
Code:
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.
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.
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.
1) Load ARC
2) Project -> Add Control from top menu
3) Select Misc Tab
4) Add Joystick
5) Select your joystick from the drop down in the Joystick Control
6) Press the GEAR on the Joystick control
7) Select the tab BUTTONS within the config window for the joystick control
8) 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
Thanks again for the reply. I have selected the joypad as you mentioned, and have the numbered buttons (1 to 6) configured and working with servos, as well as the D Pad controlling the forward and reverse controls, but never managed to get the trigger buttons or acceleration stepper button working and have never seen them highlighted, but I will try what you suggested in step 8 of you post later today.
@Richard.
I have tested the control with a game and all the buttons work (with the exception of the acceleration Stepper button. The 4 LED's light up but it didn't seem to do anything) and have checked to see if it is properly connected, which I have confirmed that it is. So unless I can get what DJ mentioned above working, then as you say, it could be a comparability issue. *stress*
I had unexpectedly been in hospital for a few days and got home a couple of days ago, so I have been unable to give any updates until now.
Anyway, I spent yesterday writing a few scripts and also tried the joypad out again. In regards to the trigger button issue I had, I started a new project and did everything else exactly how I did it before (I assure you) to set the control pad up, with one exception, I downloaded the ARC 2014.10.18.00 release that was available. Hey presto, the trigger buttons now highlight in the "buttons" list and can be used. So whatever was causing the glitch has corrected itself.
@technopro.
Thanks again for the code and instructions you supplied in your post. I now have everything working the way I like now, and your help, as well as Richard and DJ, is appreciated.
I am going to purchase another control as I need more buttons to cover all the other servos I have installed on my bot, so I would love to know what anyone would recommend that would be compatable with ARC (Preferably a wireless controller).
Thanks,
Steve.
(Ps. Apologies if my tone in post #7 seemed a little off. I was not having a great day, hence the trip to the hospital soon after. I like to problem solve things myself, and if I do get stuck I will always look through the forums and help sections first as well as tutorials, before I ever ask for help here. But it's nice to know you guys are around and willing to help the way you do which is great. All this is still quite new to me, but thanks to you guys, I am learning all the time. Great product, great site, and great community. Thanks.