Go to Post “Nothing defines humans better than their willingness to do irrational things in the pursuit of phenomenally unlikely payoffs” - Scott Adams - 114Klaatu0x72 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-12-2013, 18:59
SquishyIce's Avatar
SquishyIce SquishyIce is offline
Registered User
FRC #1405 (Finney Falcons)
Team Role: Electrical
 
Join Date: Dec 2013
Rookie Year: 2012
Location: New York
Posts: 39
SquishyIce can only hope to improve
Need Help with Arduino for Driver Station

Hey guys,
My team has recently been working on a new driver station, and we wanted to implement an Arduino UNO to read signals from button, sliders, potentiometers, etc. in addition to our standard xBox 360 controller. How do I receive and interpret these signals from the Arduino using Java? Is it even possible? Any help is appreciated.
  #2   Spotlight this post!  
Unread 31-12-2013, 19:09
SoftwareBug2.0's Avatar
SoftwareBug2.0 SoftwareBug2.0 is offline
Registered User
AKA: Eric
FRC #1425 (Error Code Xero)
Team Role: Mentor
 
Join Date: Aug 2004
Rookie Year: 2004
Location: Tigard, Oregon
Posts: 487
SoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant future
Re: Need Help with Arduino for Driver Station

Have you considered a serial port?
  #3   Spotlight this post!  
Unread 31-12-2013, 19:12
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
Re: Need Help with Arduino for Driver Station

The Cypress Board was designed for this, but the USB driver for it is a little iffy with some laptops.

You could also use this, which is new for this year.

The simplest solution is to take apart a joystick and connect your own buttons/pots instead of the ones in the joystick. We did this last year for testing, and it worked really well.

The arduino is a little tricky to do, because the driver station will only transmit data from a cypress board or a USB HID joystick, so you could write your own program that reads from the arduino (through serial over USB) and transmits the data to the robot on one of the unblocked ports. If you wanted to write a separate program that runs on the driver station laptop to transmit the data in java, you'd use the RxTx java library.


Or you could use this to make the arduino act as a USB HID device which can be recognized by the driver station. This is weird because you first load a sketch as normal, then you have to put the controller in DFU mode and reimage the communication chip to act as an HID device. This is the sort of stuff that can really mess up the arduino, so be careful.
  #4   Spotlight this post!  
Unread 31-12-2013, 19:16
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Need Help with Arduino for Driver Station

Quote:
Originally Posted by SoftwareBug2.0 View Post
Have you considered a serial port?
Why not just the serial over USB, like normal? Chances are, he doesn't have a laptop with a serial port, cables to chop up to make the serial cable needed, and an MAX232 level converter.
  #5   Spotlight this post!  
Unread 31-12-2013, 22:32
SquishyIce's Avatar
SquishyIce SquishyIce is offline
Registered User
FRC #1405 (Finney Falcons)
Team Role: Electrical
 
Join Date: Dec 2013
Rookie Year: 2012
Location: New York
Posts: 39
SquishyIce can only hope to improve
Re: Need Help with Arduino for Driver Station

Taking apart a joystick seems like a pretty good idea. I'll make a weekend project of it sometime soon. Many thanks.
  #6   Spotlight this post!  
Unread 31-12-2013, 22:48
thefro526's Avatar
thefro526 thefro526 is offline
Mentor for Hire.
AKA: Dustin Benedict
no team (EWCP, MAR, FRC 708)
Team Role: Mentor
 
Join Date: Aug 2006
Rookie Year: 2005
Location: New Jersey
Posts: 2,599
thefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond reputethefro526 has a reputation beyond repute
Send a message via AIM to thefro526 Send a message via MSN to thefro526
Re: Need Help with Arduino for Driver Station

Sorry if someone posted this already, but E-Stop robotic's CCI is probably the best/easiest method to wire in custom controls and have them work without any complicated programming or external controllers.

https://www.estoprobotics.com/estore...d&productId=33
__________________
-Dustin Benedict
2005-2012 - Student & Mentor FRC 816
2012-2014 - Technical Mentor, 2014 Drive Coach FRC 341
Current - Mentor FRC 2729, FRC 708
  #7   Spotlight this post!  
Unread 31-12-2013, 22:50
SteveGarward's Avatar
SteveGarward SteveGarward is offline
Red 5, standing by...
AKA: 7 years already
FRC #0111 (WildStang), FRC #3132 (Thunder Down Under)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2010
Location: Gurnee, IL
Posts: 173
SteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud of
Re: Need Help with Arduino for Driver Station

We looked in to using the Arduino Leonardo last year since you can use USB-HID libraries to use it as a HID device. You need to create your own HID descriptor file, but it's possible.

In the end we didn't use it, as we wanted to read switch and pot values in software, but not as a joystick, due to time. It was easier to switch back to the cypress board in the time we had. We might take another look this year though.
__________________
FRC Team 111 - WildStang (Mentor, Drive Coach)
FTC Team 7458 - Full Force! (Mentor, Coach)
FRC Team 3132 - Australia's FIRST FRC Team! (Holy crazy first year, Batman!)

  #8   Spotlight this post!  
Unread 31-12-2013, 22:52
Anthony4004's Avatar
Anthony4004 Anthony4004 is offline
Anthony4004
FRC #4004 (MARS Rovers)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Muskegon
Posts: 171
Anthony4004 is an unknown quantity at this point
Re: Need Help with Arduino for Driver Station

For 4004, we have our arduino-based control board (this year it had 7 buttons) being read via a USB and then being read as a joystick into LabView.
  #9   Spotlight this post!  
Unread 31-12-2013, 23:07
SoftwareBug2.0's Avatar
SoftwareBug2.0 SoftwareBug2.0 is offline
Registered User
AKA: Eric
FRC #1425 (Error Code Xero)
Team Role: Mentor
 
Join Date: Aug 2004
Rookie Year: 2004
Location: Tigard, Oregon
Posts: 487
SoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant future
Re: Need Help with Arduino for Driver Station

Quote:
Originally Posted by magnets View Post
Why not just the serial over USB, like normal? Chances are, he doesn't have a laptop with a serial port, cables to chop up to make the serial cable needed, and an MAX232 level converter.
Sounds good to me.
  #10   Spotlight this post!  
Unread 31-12-2013, 23:47
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,624
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Need Help with Arduino for Driver Station

Quote:
Originally Posted by SoftwareBug2.0 View Post
Sounds good to me.
Serial over USB to a Parallax Propeller, PIC4550 or AT90USB162:
https://www.olimex.com/Products/AVR/Proto/AVR-USB-162/
https://www.olimex.com/Products/PIC/Proto/PIC-USB-4550/
http://www.radioshack.com/product/in...uctId=12310183

The I/Os are TTL level so no converter needed.
There's already prototyping space on the Olimex PCB linked above.
There are American distributors for Olimex.
Propeller's use serial over USB for debugging and bootloading.

Emulated serial over USB is by far the most compatible mode of operation.
I've used it in Windows, Mac OSX, Linux, BSD, Android just to name a few.

Avoiding the HID layer you can program in a wider range of languages and avoid some interesting issues.
I've even got shell scripts that can take input from serial ports that are really USB connected.
  #11   Spotlight this post!  
Unread 01-01-2014, 09:31
rkoripalli's Avatar
rkoripalli rkoripalli is offline
Registered User
AKA: Rohan Koripalli
FRC #3735 (Klein Bots)
Team Role: Alumni
 
Join Date: Aug 2013
Rookie Year: 2013
Location: Klein
Posts: 19
rkoripalli is an unknown quantity at this point
Re: Need Help with Arduino for Driver Station

Not sure how you would do this on an Uno, but the Leonardo has USB joystick libraries you can use. You could also use a USB teensy with the arduino IDE as it supports those libraries as well. I've done this on the teensy and it's very easy.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi