Go to Post It certainly shows to never give up, even if all you can do is score a single tetra. - Joe Ross [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 11-12-2011, 17:45
Garrett.d.w's Avatar
Garrett.d.w Garrett.d.w is offline
Build Lead
FRC #2733 (The Pigmice)
Team Role: Alumni
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Portland
Posts: 318
Garrett.d.w is a splendid one to beholdGarrett.d.w is a splendid one to beholdGarrett.d.w is a splendid one to beholdGarrett.d.w is a splendid one to beholdGarrett.d.w is a splendid one to beholdGarrett.d.w is a splendid one to beholdGarrett.d.w is a splendid one to behold
Re: Arduino Board and FRC Victors

If you want to use a computer to send commands to the arduino then use Processing (arduino's computer based cousin). There is a library included in the software package that allows you to interface with the arduino though the usb serial connection.

If you want to control the whole setup remotely, you can use an xbee shield and radio to create a wireless serial connection between two arduinos.

Personally, I have used ps2 controllers as shown in this link (http://www.billporter.info/playstati...-library-v1-0/). It's much cleaner than soldering the connections to the potentiometers inside the controller, plus you can do some interesting things with the ruble feature, etc. There is also some canned code on that web page.

The web site also has a library for creating complex serial communication protocols (which comes in handy when you want to transmit more than one variable over a serial connection).

PM me and I can send you pictures of the project setup and code (if I can find it).
__________________
"A mind once stretched by a thought will never regain it's original dimensions."

Optimists think the glass is half full.
Pessimists think the glass is half empty.
Engineers realize it's twice as big as it needs to be.
  #2   Spotlight this post!  
Unread 11-12-2011, 17:52
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Arduino Board and FRC Victors

Quote:
Originally Posted by Garrett.d.w View Post
If you want to use a computer to send commands to the arduino then use Processing (arduino's computer based cousin). There is a library included in the software package that allows you to interface with the arduino though the usb serial connection.

If you want to control the whole setup remotely, you can use an xbee shield and radio to create a wireless serial connection between two arduinos.
Thanks, this is truly what I was looking for, I had thought of the xbee addition and that would work; I just didn't know a simple environment that would allow the communication.

Also, I am thinking of the use of bluetooth, or it looks like in aj's link that with the ethernet shield, it could be connected to a router.
  #3   Spotlight this post!  
Unread 11-12-2011, 22:08
ajlapp ajlapp is offline
Registered User
AKA: Anthony Lapp
None #0118 (Team RUSH and Robonauts)
 
Join Date: Sep 2001
Rookie Year: 1996
Location: Ortonville, MI
Posts: 648
ajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond reputeajlapp has a reputation beyond repute
Re: Arduino Board and FRC Victors

Quote:
@ajlapp - Was looking around on the site and looks interesting, do you have a document that explains how it is setup?
No specific document exists at this time, sorry. The source code for both the robot side and operator side is available at the link previously provided.

In general each side of this system has an Arduino and an Ethernet shield. We used Asus routers to communicate.

Everything we use in the system is open-source and available in various libraries.

For the linked project we chose to have an Arduino on the operator side for portability, but this isn't necessary. We typically build these setups with just a laptop on the driver side.

In the very near future this system will be available in a low-cost consumer ready package. It's very cool and very open.
__________________
Anthony Lapp
FIRST Engineering Mentor
Owner/Operator 221 Robotic Systems
221 Robotics Systems - Quality Hardware, Made in the USA
RobotOpen
anthony@221robotics.com
Twitter us: @221RobotSystems
Team 1 --> 94 --> 68 --> 221 --> 857 --> 27 --> 118
Design Engineer/Fabricator and 17 year vet
Team Rush (FRC27) and Robonauts (FRC118)
  #4   Spotlight this post!  
Unread 30-03-2012, 13:44
tipsmiller's Avatar
tipsmiller tipsmiller is offline
Team co-captain
AKA: Gavin Miller
FRC #0159 (Alpine Robotics)
Team Role: Mechanical
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Fort Collins, CO
Posts: 11
tipsmiller is an unknown quantity at this point
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.
__________________
"Do not let school get in the way of your education"
~Mark Twain

Last edited by tipsmiller : 30-03-2012 at 13:46.
  #5   Spotlight this post!  
Unread 12-12-2011, 10:28
tsaksa's Avatar
tsaksa tsaksa is offline
Registered User
FRC #0997 (CHS Robotics)
Team Role: Mentor
 
Join Date: Jul 2011
Rookie Year: 2011
Location: Corvallis Oregon
Posts: 203
tsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond reputetsaksa has a reputation beyond repute
Re: Arduino Board and FRC Victors

Quote:
Originally Posted by Garrett.d.w View Post
If you want to use a computer to send commands to the arduino then use Processing (arduino's computer based cousin). There is a library included in the software package that allows you to interface with the arduino though the usb serial connection.
Clip
.
Good information, and the link to the PS2 library was really handy. I was also considering an XBee radio or other wireless interface at some point to build a more complete low cost Arduino controller. However, do not write off the more crude method of wiring directly into the controller to get at the potentiometers. While this is a much less elegant solution than what you propose it has some other values.

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.
__________________
This is the zeroth day of the rest of your life.
  #6   Spotlight this post!  
Unread 14-12-2011, 14:53
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
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...
  #7   Spotlight this post!  
Unread 14-12-2011, 18:09
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,998
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
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.
__________________

I am N2IRZ - What's your callsign?
  #8   Spotlight this post!  
Unread 15-12-2011, 15:39
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
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.
  #9   Spotlight this post!  
Unread 15-12-2011, 20:52
ericbarch's Avatar
ericbarch ericbarch is offline
221 Robotic Systems Engineer
FRC #0027 (Team Rush)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Clarkston, MI
Posts: 15
ericbarch is a jewel in the roughericbarch is a jewel in the roughericbarch is a jewel in the roughericbarch is a jewel in the rough
Send a message via AIM to ericbarch
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.
__________________
Eric Barch
221 Robotic Systems
Controls Engineer
http://team221.com
  #10   Spotlight this post!  
Unread 15-12-2011, 23:45
CarlosGJ CarlosGJ is offline
Registered User
FRC #0418 (Purple Haze)
Team Role: Mechanical
 
Join Date: Feb 2011
Rookie Year: 2008
Location: Austin, Texas
Posts: 8
CarlosGJ is an unknown quantity at this point
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.
  #11   Spotlight this post!  
Unread 19-12-2011, 08:23
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,363
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
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.
  #12   Spotlight this post!  
Unread 19-12-2011, 11:22
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
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.
  #13   Spotlight this post!  
Unread 30-03-2012, 10:13
Johnjohn Johnjohn is offline
Registered User
no team
 
Join Date: Mar 2012
Location: U.S.A.
Posts: 1
Johnjohn is an unknown quantity at this point
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
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 23:25.

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