View unanswered posts | View active topics It is currently Mon Sep 22, 2014 12:17 pm






Reply to topic  [ 3 posts ] 
Joystick>>RobotC>>.txt file>>arduino? 
Author Message
Rookie

Joined: Thu Aug 01, 2013 7:03 pm
Posts: 23
Post 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!


Fri Aug 09, 2013 10:06 pm
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post 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

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Fri Aug 09, 2013 11:36 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post 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


Sat Aug 10, 2013 3:16 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.