Go to Post Nobody wins a Regional on Thursday. - Bill Moore [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2017, 10:32
question question is offline
Registered User
FRC #2472
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Minnesota
Posts: 7
question is an unknown quantity at this point
how to use USB connection from arduino to roborio?

I am attempting to use the arduino as a coprocessor for camera tracking with the pixy camera, my code is here https://www.chiefdelphi.com/forums/s...d.php?t=153849

Basically I need to be able to send one byte to the arduino and have the arduino respond with a different byte, I have had issues finding example code that reads and responds with data from the USB port on the roborio. I would like to do this without a logic converter like rioduino. I am open to suggestions for sending and receiving data
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2017, 13:07
david.e.boles david.e.boles is offline
Bringer of Whales and Petunias
AKA: david476
FRC #5940 (BREAD)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2011
Location: San Francisco, CA
Posts: 30
david.e.boles is on a distinguished road
Re: how to use USB connection from arduino to roborio?

It may be cleaner to just use a more direct protocol supported by the RoboRIO instead of USB (e.g. SPI, I2C, RS232). Otherwise, WPILib looks like it has a SerialPort class with Port enums for USB; have you tried that?
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2017, 13:11
question question is offline
Registered User
FRC #2472
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Minnesota
Posts: 7
question is an unknown quantity at this point
Re: how to use USB connection from arduino to roborio?

I tried i2c but whenever I tried to send/receive data from the arduino the transaction fail
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2017, 13:39
engunneer's Avatar
engunneer engunneer is online now
Alumni turned Mentor
AKA: Branden Gunn
FRC #4761
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1996
Location: Reading, MA
Posts: 869
engunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond repute
Re: how to use USB connection from arduino to roborio?

for I2C the arduino needs to be the slave (this is possible using the Wire library)

for the RS232 port on board the roboRio, there is default debug data spewing out of it that needs to be disabled (I don't have a link handy)

search here on the forum for kSerial, I recall a number of posts talking about this.
__________________
Student FRC23 (1996-1999), Mentor FRC246 (2000), Mentor FRC1318 (2007-2009), Mentor FRC93 (2011), Mentor FRC2151 (2012), Mentor FRC23 (2013), Mentor FRC4761 (2014-2017)
1998 - National Chairman's Award and Woodie Flowers Award (FRC23, Mike Bastoni ) | 2007 - PNW SF (488, 1595) | 2008 - Oregon RCA - Seattle #2 Seed, SF (488, 1696) | 2009 - Oregon #1 Seed, Winners (1983, 2635) - Seattle SF (945, 2865) - Galileo #2 Seed, SF (973, 25) | 2012 Midwest F (111, 71) | 2014 RIDE Winners (78, 125), Inspector - NEU #24, QF (3479, 3958) - NECMP #35 | 2015 Reading #11, SF (1058, 190), Inspector - RIDE #17, QF(4055, 5494), Inspector - NECMP #57 | 2016 Reading #4, SF (133, 4474), DCA, Inspector - Ride #22, SF (1735, 2067), Creativity, Inspector - NECMP #48, RCA - Archimedes
Reply With Quote
Reply


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


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

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