View unanswered posts | View active topics It is currently Sun Sep 21, 2014 8:30 pm






Reply to topic  [ 4 posts ] 
Controlling Cortex via USB 
Author Message
Rookie

Joined: Thu Nov 10, 2011 7:28 pm
Posts: 2
Post Controlling Cortex via USB
Hey All,

I am in a robotics class at the university level and we are trying to find a way to communicate with the Cortex micro-controller using the USB. We've been using RobotC due to the breadth of its API but we are running into a wall trying to get this to work.

The reason we are wanting to communicate via USB is because we are wanting to write an Android App to control a Vex robot. We were attempting wireless, but before we could proceed on that aspect of this project, we needed to figure out how to use the USB port on the Cortex, or decide if this is even possible.

I think this is doable with RobotC, but we haven't been able to find any way of getting this to work for us. We were wondering if there is any support for communication over the USB port provided by RobotC, and if so, how we can go about doing that.

Thanks for the help.


Thu Nov 10, 2011 7:36 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post Re: Controlling Cortex via USB
Sounds like a really cool project. Unfortunately, I don't think that the USB communication channel is as open as you will need it to be. The Master firmware for the Cortex sets it up to facilitate a serial link between it and the PC or it and the Joysticks... there's no user level control about where or what messages get sent via the USB port.

To take a look at the messages that get passed back and forth, go to Window > Menu Level > Super User. Then go to View > Display Message Log Window. The next time you download a program or open the debugger, a Message Log window will appear and show you the data being passed back and forth.

The UART ports on the Cortex are open to the type of user control messaging that you would need, but you'll need to add an extra hardware layer that would sit between the android device and Cortex. This is what we're doing with our multi robot project and Xbee radios: http://www.robotc.net/firewiki/index.ph ... =Main_Page

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Fri Nov 11, 2011 4:23 pm
Profile
Rookie

Joined: Thu Nov 10, 2011 7:28 pm
Posts: 2
Post Re: Controlling Cortex via USB
Thanks for the reply Jb.

We are just going to get a USB-to-UART converter and send characters out of the android device and try to receive them from the Cortex and control the robot that way.

One thing I was trying to get to work though was the message log. I open it up, but I don't seem to get anything to come up on screen. I've downloaded a couple of the sample programs just to see if there would be anything that would appear, but there is nothing popping up in the log.

Is there something I need to do to set up the log to correctly display the information going back and forth?

Thanks again for the help.


Tue Nov 15, 2011 6:19 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post Re: Controlling Cortex via USB
Sorry, there was one more step for the message log...

Again while in Super User, go to View > Preferences > Detailed Preferences.

There will be an "Internal" tab with a "Message Tracing" Box. Change the selection from "None" to "Messages" or one of the other options.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Thu Nov 17, 2011 9:16 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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.