Go to Post If Will uses the word "dope", doesn't wear a larger FIRST logo, takes up half of the St. Louis arena, if there was not enough seating in the pits, if the music was killed during finals, it was all justified tonight. - Barry Bonzack [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 21-01-2010, 13:23
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Emulating a Joystick

Is the source for FIRST's default implementation of the Cypress PSoC board available anywhere? Is it against the rules to modify the default firmware on that board?

There is no reason you can't set up a simple system that uses an I2C controller and HID comms on the PSoC board. If we are not able to get our hands on the default firmware, you can check out this article for a start: http://www.cypress.com/?rID=39404
  #2   Spotlight this post!  
Unread 21-01-2010, 13:38
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Emulating a Joystick

Quote:
Originally Posted by TomBot View Post
Is the source for FIRST's default implementation of the Cypress PSoC board available anywhere? Is it against the rules to modify the default firmware on that board?

There is no reason you can't set up a simple system that uses an I2C controller and HID comms on the PSoC board. If we are not able to get our hands on the default firmware, you can check out this article for a start: http://www.cypress.com/?rID=39404
Actually, it is against the rules. I had the same idea, but for some reason they want to keep it locked down. See rule <R60N>


Another question... Is there an application or something that I can use to see the output of a usb joystick? I need something for testing, and I don't have any way of telling what the joystick is actually outputting.

Last edited by Geek 2.0 : 21-01-2010 at 13:47.
  #3   Spotlight this post!  
Unread 21-01-2010, 14:03
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by Geek 2.0 View Post
Actually, it is against the rules. I had the same idea, but for some reason they want to keep it locked down. See rule <R60N>


Another question... Is there an application or something that I can use to see the output of a usb joystick? I need something for testing, and I don't have any way of telling what the joystick is actually outputting.
Maybe something like this? http://sourceforge.net/projects/usbsnoop/

Also, R60N seems kind of silly. According to the rules, I can buy or build any HID compliant USB device to hook up to the driver's station, but I cannot use the FirstTouch (which is most likely a safer/easier avenue than building any custom electronics). Why the draconian restriction?
  #4   Spotlight this post!  
Unread 21-01-2010, 15:58
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by TomBot View Post
Also, R60N seems kind of silly. According to the rules, I can buy or build any HID compliant USB device to hook up to the driver's station, but I cannot use the FirstTouch (which is most likely a safer/easier avenue than building any custom electronics). Why the draconian restriction?
I believe you would be disappointed at the very next step if R60N didn't exist and you were to try use the Cypress board for what you are talking about. You would find out that the USB interface has nothing to do with the PSoC and that Cypress does not release the code for the processor that does. The First Touch Kit 3 board cannot implement HID (given the publicly available resources). The interface had to be implemented in a very non-generic way and the other end of this binary interface (the Driver Station software) you have no access to change. Because of this, allowing you to customize the firmware would gain rather little flexibility compared with the opportunity for frustration and failure. I don't believe the idea was simply to play Draco for the sake of it.
  #5   Spotlight this post!  
Unread 21-01-2010, 16:44
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Emulating a Joystick

Quote:
Originally Posted by jhersh View Post
I believe you would be disappointed at the very next step if R60N didn't exist and you were to try use the Cypress board for what you are talking about. You would find out that the USB interface has nothing to do with the PSoC and that Cypress does not release the code for the processor that does. The First Touch Kit 3 board cannot implement HID (given the publicly available resources). The interface had to be implemented in a very non-generic way and the other end of this binary interface (the Driver Station software) you have no access to change. Because of this, allowing you to customize the firmware would gain rather little flexibility compared with the opportunity for frustration and failure. I don't believe the idea was simply to play Draco for the sake of it.
However, I could send the data to the FirstTouch board over something like SPI and totally avoid using USB HID, which would be amazing in this case because I'm getting frustrated trying to understand how HID descriptors work.



On another note... Anyone know why WPILib doesn't have sliders for HID devices?

Last edited by Geek 2.0 : 21-01-2010 at 16:51.
  #6   Spotlight this post!  
Unread 21-01-2010, 23:46
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by Geek 2.0 View Post
However, I could send the data to the FirstTouch board over something like SPI and totally avoid using USB HID, which would be amazing in this case because I'm getting frustrated trying to understand how HID descriptors work.
What I was referring to with the binary interface is that if you come up with some new data to send from som SPI or I2C source, there is no field going back to the robot for you to put that data into. You would have to replace, for instance, some of the analog input channels or something. In any case, it wouldn't be clean or supportable.

Quote:
Originally Posted by Geek 2.0 View Post
On another note... Anyone know why WPILib doesn't have sliders for HID devices?
Not sure what you're talking about here. Can you be more specific or elaborate? Are you using WPILib in LabVIEW, I guess? There is no HID on the robot, so are you talking about the dashboard? Please be more detailed.
  #7   Spotlight this post!  
Unread 23-01-2010, 23:02
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Emulating a Joystick

Quote:
Originally Posted by jhersh View Post
Not sure what you're talking about here. Can you be more specific or elaborate? Are you using WPILib in LabVIEW, I guess? There is no HID on the robot, so are you talking about the dashboard? Please be more detailed.
USB HID supports analog values that are not one of the 6 axes (called Sliders), meaning you can send more than 6 analog values. The WPILib does not check joysticks for these. I would assume it's to keep the packet size from getting too large, but I'm not sure. I was hoping to use USB because I originally thought it wouldn't limit the amount of data we can send, but apparently it still does (6 analogs and 12 digitals).
  #8   Spotlight this post!  
Unread 24-01-2010, 08:02
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Emulating a Joystick

Not to discourage your interfacing project here, but the enhanced I/O API for the cypress is packed with goodies. I saw a video of a team just a few days ago who made their own Wii-mote from the cypress board and were tilt driving.

Out of curiosity, what is it that you want to connect that requires this amount of interfacing?

Greg McKaskle
  #9   Spotlight this post!  
Unread 24-01-2010, 08:05
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by Greg McKaskle View Post
Not to discourage your interfacing project here, but the enhanced I/O API for the cypress is packed with goodies. I saw a video of a team just a few days ago who made their own Wii-mote from the cypress board and were tilt driving.

Out of curiosity, what is it that you want to connect that requires this amount of interfacing?

Greg McKaskle
http://www.chiefdelphi.com/forums/sh...4&postcount=10
  #10   Spotlight this post!  
Unread 24-01-2010, 09:46
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Emulating a Joystick

Quote:
Originally Posted by Greg McKaskle View Post
Not to discourage your interfacing project here, but the enhanced I/O API for the cypress is packed with goodies. I saw a video of a team just a few days ago who made their own Wii-mote from the cypress board and were tilt driving.

Out of curiosity, what is it that you want to connect that requires this amount of interfacing?

Greg McKaskle
I didn't see all that much in the enhanced I/O. I understand that there are a lot of goodies ON the board, and we COULD utilize them, but the point is that we're looking to communicate to the robot from our control system, and the cypress does not make a good intermediate device.
  #11   Spotlight this post!  
Unread 24-01-2010, 10:27
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by Geek 2.0 View Post
I didn't see all that much in the enhanced I/O. I understand that there are a lot of goodies ON the board, and we COULD utilize them, but the point is that we're looking to communicate to the robot from our control system, and the cypress does not make a good intermediate device.
There isn't any reason something like this couldn't be supported, it simply wasn't a use case I considered to be useful to most teams. Perhaps for next year something like this could be. Can you describe the requirements you would have? Would it be helpful if all it did is interface with your other circuit and did not expose any other features?
  #12   Spotlight this post!  
Unread 24-01-2010, 19:01
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Emulating a Joystick

Quote:
Originally Posted by jhersh View Post
There isn't any reason something like this couldn't be supported, it simply wasn't a use case I considered to be useful to most teams. Perhaps for next year something like this could be. Can you describe the requirements you would have? Would it be helpful if all it did is interface with your other circuit and did not expose any other features?
That would be nice, but I realize that that isn't the best solution for all teams. I think some communication (like SPI, I2C, UART, etc.) would eliminate any bottlenecks in the design.
  #13   Spotlight this post!  
Unread 22-01-2010, 12:06
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by Geek 2.0 View Post
However, I could send the data to the FirstTouch board over something like SPI and totally avoid using USB HID, which would be amazing in this case because I'm getting frustrated trying to understand how HID descriptors work.
You must talk HID to the Classmate. Downstream of that you can do whatever you want. As Joe said, if you want to use the FirstTouch board (which you cannot, according to the rules) you would have to box up all of your data into the fields that already exist.

Last edited by Tom Bottiglieri : 22-01-2010 at 12:08.
  #14   Spotlight this post!  
Unread 21-01-2010, 14:10
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by Geek 2.0 View Post
Another question... Is there an application or something that I can use to see the output of a usb joystick? I need something for testing, and I don't have any way of telling what the joystick is actually outputting.
LabVIEW makes that very easy if you have HID working. Otherwise, you need something like what Tom linked.
  #15   Spotlight this post!  
Unread 22-01-2010, 12:59
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Emulating a Joystick

For my senior design project 2 years ago we used one of the Cypress PSoC boards to communication via USB. It was reasonably easy to setup once you figured out how their design workflow was laid out.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
1 joystick or 2? ChrisMcK2186 Control System 18 19-01-2007 23:42
joystick ? _GP_ General Forum 1 26-02-2004 23:10
Joystick rmmlg Inventor 0 15-02-2004 16:34
No Joystick archiver 2001 2 24-06-2002 01:14
Joystick Absolute Value Technical Discussion 21 22-02-2002 10:56


All times are GMT -5. The time now is 01:58.

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