Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Communicating with a laptop (http://www.chiefdelphi.com/forums/showthread.php?t=78845)

BEEKMAN 03-11-2009 19:40

Communicating with a laptop
 
Okay, so, now that all of team 1058's competitons are over, we are playing around with some coding. We plan on making our robot driven via a wireless 360 controller. Currently we have it working via a Laptop, passeing data to an arduino, then to the digital/analog IO on teh DS, however, this is inefficient, and slow. Is ther a way i can directly communicate from a laptop to the DS (or maybe even to the robot with wifi???".

I'm not 100% sure, but cant i send an array of bytes through a digital port from a serial port on the laptop (wit the proper hard ware of course)?? How do I do that?

Can i use teh second ethernet port, and send data that way?

RyanCahoon 04-11-2009 06:46

Re: Communicating with a laptop
 
To have the laptop control the robot directly, take a look at [Dave Flowerday]'s virtual driver station software.

For information on sending serial data through the DS's digital inputs, check out this prior discussion.

--Ryan

virtuald 30-11-2009 07:54

Re: Communicating with a laptop
 
Also keep in mind that there is a full network stack in vxWorks, so you can communicate over the network too using traditional socket programming. We put a lightweight webserver on our bot so we can control it by accessing a webpage. :)

slavik262 06-12-2009 00:27

Re: Communicating with a laptop
 
So using the socket programming in vxWorks you can set up a socket on your laptop and a socket on your laptop and communicate with the two?

What about the user data packet already sent back to the robot from the DS? Is there any way to access that?

virtuald 06-12-2009 00:33

Re: Communicating with a laptop
 
Quote:

Originally Posted by slavik262 (Post 886162)
So using the socket programming in vxWorks you can set up a socket on your laptop and a socket on your laptop and communicate with the two?

Yes. If you've done sockets before, this is probably the most flexible way to go. Probably not legal to use during a competition though.

Quote:

What about the user data packet already sent back to the robot from the DS? Is there any way to access that?
Yes, look into the dashboard class. The official dashboard stuff is done in labview, but I know I saw some threads about someone who made one in C# or C++ or something...

slavik262 06-12-2009 00:41

Re: Communicating with a laptop
 
I'm not a huge fan of LabVIEW... I'm kind of a C++ guy. Would sending data back using the DS be legal in competition?

Alan Anderson 06-12-2009 09:25

Re: Communicating with a laptop
 
Quote:

Originally Posted by slavik262 (Post 886165)
I'm not a huge fan of LabVIEW... I'm kind of a C++ guy. Would sending data back using the DS be legal in competition?

It was legal last year. That's exactly what the Dashboard packets are for.

slavik262 06-12-2009 09:29

Re: Communicating with a laptop
 
Sorry, I misspoke. How could a laptop get access to the DS packets going back to the robot so that the laptop can communicate to the robot without using LabVIEW?

Alan Anderson 06-12-2009 12:55

Re: Communicating with a laptop
 
Quote:

Originally Posted by slavik262 (Post 886189)
Sorry, I misspoke. How could a laptop get access to the DS packets going back to the robot so that the laptop can communicate to the robot without using LabVIEW?

I misunderstood the question anyway. Sending arbitrary data to the robot is not supported by the Dashboard protocol; it's one-way UDP from the robot only.

slavik262 06-12-2009 14:03

Re: Communicating with a laptop
 
Thanks for clearing up the confusion. And using sockets during competition would probably be illegal. That's unfortunate... I was hoping for two-way communication. Oh well... at least we can have it for debugging.

Joe Ross 06-12-2009 19:36

Re: Communicating with a laptop
 
Last year, I did not find any rule that made it illegal to use your own socket interface to communicate from the dashboard to the robot. It would be very easy for FIRST to firewall off unnecessary ports (I don't know if they did or not). There was a few questions on the Q/A about what ports were open, but there was never an adequate answer.

slavik262 11-12-2009 10:18

Re: Communicating with a laptop
 
So we shouldn't completely rule it out then, but try to get a better answer to whether FIRST will allow us to use sockets?

Also, if it wouldn't be too inconvenient, would you kindly give me a link to the networking API for VxWorks? I'm browsing around in the library documentation but dont' know where to look.

EDIT: Is this what I'm looking for?

http://www.slac.stanford.edu/exp/gla...ckLib.html#top

byteit101 12-12-2009 08:41

Re: Communicating with a laptop
 
yes, that is the docs.
see http://www.chiefdelphi.com/forums/sh...ad.php?t=72874 and download the link on the 4th post for a small library using sockLib
the man documentation is also in C:\WindRiver\vxworks-6.3\man\cat1\sockLib.1
and C:\WindRiver\vxworks-6.3\man\cat2\functionname.2

slavik262 05-01-2010 11:00

Re: Communicating with a laptop
 
Sorry to bump this, but where is the Q & A where we can ask about using sockets? Will it be on the FRC website once competitions start up?

byteit101 05-01-2010 15:06

Re: Communicating with a laptop
 
Quote:

Originally Posted by slavik262 (Post 893115)
Sorry to bump this, but where is the Q & A where we can ask about using sockets? Will it be on the FRC website once competitions start up?

FIRST forums for official answers


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi