Go to Post Remember those two words people. Gracious Professionalism. - Elgin Clock [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
  #16   Spotlight this post!  
Unread 21-01-2010, 14:14
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Emulating a Joystick

Quote:
Originally Posted by Geek 2.0 View Post
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.
If you're using Windows XP, go into the Control Panel and select Game Controllers (under Printers and Other Hardware if you have category view selected). It will show a list of any joysticks or gamepads, and if you click on one and click Properties it will show you the axes and buttons and their states in real time.
  #17   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.
  #18   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.
  #19   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.
  #20   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,187
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.
  #21   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,086
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
  #22   Spotlight this post!  
Unread 22-01-2010, 15:35
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 virtuald View Post
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.
The problem here is that the First Touch Kit 3 board does not have the USB connector wired to the PSoC, so you can't use the USB IP that is in the PSoC. The USB connector just goes to a SWD interface chip for debugging and programming the PSoC. The board was not designed to expose USB to the application on the PSoC. We basically had to go way outside the scope of the design to make it work for FIRST's requirements.
  #23   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).
  #24   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,753
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
  #25   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
  #26   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.
  #27   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?
  #28   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.
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 21: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