![]() |
Roborio comms with arduino over USB
Recently I've been experimenting with sending status codes to an Arduino from the RoboRio. I've so far tried toggling serial from the MXP to the arduino, and serial over USB between them. Neither of these have worked yet. I was wondering if any teams had input on how to send single byte status packets?
Current robot code (java): Code:
arduino = new SerialPort(19200,SerialPort.Port.kUSB);Code:
RuntimeException: HAL: -VISA: Resource not found at [SerialPortJNI.serialInitializePort] |
Re: Roborio comms with arduino over USB
Quote:
|
Re: Roborio comms with arduino over USB
How do you guys specify which USB port of the RoboRIO to use? We have a webcam and an Arduino board plugged into the two RoboRIO ports. I can be wrong but it seems that the robot code tries to talk to a wrong device sometimes. Can I do something more specific than kUSB? Thanks.
|
Re: Roborio comms with arduino over USB
Quote:
|
Re: Roborio comms with arduino over USB
USB doesn't really have "ports." The two ports on the roboRIO are basically the same hole, if you will, much like putting a USB hub into one doesn't make 6 new addressable spaces, it's just more holes on the bus.
Your Arduino will show up as /dev/ttyUSB0 or /dev/ttyACM0 in some cases, like a Mega. The webcam will show up as /dev/video0, then /dev/video1, etc, as you add cameras assuming they're supported in Video4Linux. The addressing is basically the responsibility of the OS unless you want to get far deeper into USB specs than I have ever bothered. |
| All times are GMT -5. The time now is 02:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi