![]() |
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 |
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?
|
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
|
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. |
| All times are GMT -5. The time now is 21:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi