|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
Re: Arduino Board and FRC Victors
Quote:
1. Dirt cheap. (I am comparing to the wireless version here) You can build the entire (wired) control system including the computer for less than $30 if you scrounge a few parts for the box and connectors. This is a more reasonable price if your intent is just to build a small debug tool. 2. The students get to open up the controller, identify and test them with a multimeter, see how the joysticks were used, and connect to them. I find it hard to get some of the students interested in practicing soldering skills. But this project did interest them. 3. I think it is easier for the students to understand the complete operation of the simpler system. At least till they get more experience with the Arduino. 4. You can use this approach for controlling your own analog circuits or devices other than the Arduino. But, you are right that library is cool. I will have to try it now. It is too bad the PS2 used such a large and unusual connector. If it already came with something small and common you could be up and running in half the time. |
|
#17
|
|||
|
|||
|
Re: Arduino Board and FRC Victors
Ok, I am using Processing to attempt to send the Joystick data to the Arduino board.
But I just can't figure out how to get the info from the joystick... |
|
#18
|
|||||
|
|||||
|
Re: Arduino Board and FRC Victors
As mentioned, an Analog joystick is given 5 volts and ground and returns an analog voltage between 0 and 5 volts (-ish).
A USB Joystick requires you to use the USB Serial connection. |
|
#19
|
|||
|
|||
|
Re: Arduino Board and FRC Victors
I'm sorry, but I am still very confused on how to do it (been looking on google for a while). I am trying to use a joystick that is connected to the PC which is sending the value to the Arduino Board which will act upon it using the servo class.
|
|
#20
|
||||
|
||||
|
Re: Arduino Board and FRC Victors
Just wanted to throw in my 2 cents. I've been working with ajlapp to design an Arduino based control system and we've learned a few things along the way.
Your best bet is to go with whatever language you're most comfortable on your PC (Visual Basic, Java, Python, LabView, etc...). There are plenty of great libraries out there for each of those languages that support reading in USB controllers and make it very simple. I personally use Java along with the JInput USB library: http://www.newdawnsoftware.com/resources/jinput/ If needed I can provide all of the source code to get the basic values using JInput. All you need to do once you have the values is write it out onto the USB serial port that the Arduino is connected to. It's up to you how you want to write the values, but one way would be using a delimiter or a marker character that tells the arduino that a new value from the joystick is coming through. All modern programming languages should have a simple library or method of writing out to any connected serial port. The nice thing about doing it this way is that you could very easily replace the wired USB connection with a XBee shield and XBee USB adapter (http://www.sparkfun.com/products/9819) down the line to go wireless. |
|
#21
|
|||
|
|||
|
Re: Arduino Board and FRC Victors
http://principialabs.com/joystick-control-of-a-servo/
This explains how to use Python to get data from a USB joystick, and send it to an Arduino via serial. Of course, you could probably do it somewhat more easily in Labview. The code given is very good basic material-- I have adapted it for multiple joysticks, control over Ethernet, etc. |
|
#22
|
|||
|
|||
|
Re: Arduino Board and FRC Victors
GHI makes an Arduino compatible board with an Arm 7 on it. You program it with dot net C#. It has a USB host interface and a Class that will allow you to pull the values from a wireless USB game controller eliminating the PC.
http://www.tinyclr.com/support/ I like the Pololu servo driver boards http://www.pololu.com/catalog/category/12 Plug the usb wireless into the arm board and then talk to the servo board by serial. Gives rock solid control. Assuming one has C# experience. |
|
#23
|
|||
|
|||
|
Re: Arduino Board and FRC Victors
Thanks for the help. Yea, I think the decision I made is to test the self-modified controller and also try the USB shield and comimunicate using Xbee or one of those. Might try Ethernet -> Wifi -> Wifi -> Ethernet cause I would like to try to implement the routers, and seeing how that goes.
|
|
#24
|
|||
|
|||
|
Re: Arduino Board and FRC Victors
Newbie here
I was wondering if anyone that got the ... http://principialabs.com/joystick-control-of-a-servo/ ... to work over Ethernet shield would mind sharing the code. Like I said Noob here and just can't get it to work. John |
|
#25
|
||||
|
||||
|
Re: Arduino Board and FRC Victors
Another option (if you don't want to do surgery on a controller) is to use the Processing software (http://processing.org/) with the proCONTROLL Library (http://creativecomputing.cc/p5libs/procontroll/). The proCONTROLL library will read your inputs, you can interpret them however you like, and then send them through serial to the Arduino.
I found this very convenient as Arduino is based off of Processing, making the interfaces nearly identical and easy to work with. I should be able to dig up some sample code later. Last edited by tipsmiller : 30-03-2012 at 13:46. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|