ROBOTC.net forums
http://robotc.net/forums/

Joystick>>RobotC>>.txt file>>arduino?
http://robotc.net/forums/viewtopic.php?f=1&t=6512
Page 1 of 1

Author:  Matt99 [ Fri Aug 09, 2013 10:06 pm ]
Post subject:  Joystick>>RobotC>>.txt file>>arduino?

So, I fairly extensive knowledge with C++, and decent with RobotC and Arduino. My question is: can I control my Arduino through the RobotC software? Like for example, running the joystick control setup in RobotC, having it save that data to a text file, and having my arduino decode that data and use it? The Arduino would be connected to the computer via USB. Any tips on how to do this would be greatly appreciated! Thanks in advance!

Author:  Ernest3.14 [ Fri Aug 09, 2013 11:36 pm ]
Post subject:  Re: Joystick>>RobotC>>.txt file>>arduino?

Why don't you interface the joysticks directly with the Arduino?
http://msdn.microsoft.com/en-us/library ... 53(v=vs.85).aspx

Author:  MHTS [ Sat Aug 10, 2013 3:16 am ]
Post subject:  Re: Joystick>>RobotC>>.txt file>>arduino?

Matt99 wrote:
So, I fairly extensive knowledge with C++, and decent with RobotC and Arduino. My question is: can I control my Arduino through the RobotC software? Like for example, running the joystick control setup in RobotC, having it save that data to a text file, and having my arduino decode that data and use it? The Arduino would be connected to the computer via USB. Any tips on how to do this would be greatly appreciated! Thanks in advance!

What are your goals? Like Ernest3.14 said, it may be easier to have arduino to read the joystick directly. The game controllers are USB HID devices. It is relatively easy to write a Windows App to read the joystick. I haven't hacked too much with arduino but the USB interface is supposed to be a COM interface (i.e. serial) So it should be quite easy to have the Windows app reading the joystick and writing it to the USB COM port. But of course, the next step is to write code for the arduino to read the serial stream and react to it.
Alternatively, there are many variations of arduino. If your arduino has a USB host port (e.g. USB host shield), you can even plug the game controller directly to it. But then you need to understand how to write arduino code to read and interpret HID reports unless there is an Arduino library for it. There is a pretty good article on the subject.
http://www.circuitsathome.com/communica ... ces-part-1

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/