I don't believe an Arduino sketch running on the 32U4 can use the Bridge library to open the USB device on the AR3391. To be honest, I've not tried it, but it is probably only for accessing the SD card.
aggrav8d:
I only need to pass through for debugging. Once I'm done it will log data to SD card.
This is starting to sound more and more like a strictly Linux solution, and not necessarily involving a sketch on the Arduino side.
The USB device will be accessed from some Linux code. The SD card is also on the Linux processor, and while that is accessible from a sketch through the Bridge library, it would be much more efficient to do that on the SD side as well.
This data flow:
USB --> Linux --> SD
would be much more efficient than:
USB --> Linux --> Bridge --> sketch --> Bridge --> SD
You could probably figure out a way to use the latter data flow, doing part of it in a sketch. But I think you're going to have to write at least part of the code on the Linux side, and it will probably be easier to do most, if not all, of it on the Linux side.
Do you have any other I/O requirements that would require a sketch to be involved? Anything connected to the Arduino header pins?
In the future I would love to plug a joystick into a YUN and use it to drive my robot.
You will almost certainly have to get the Linux side involved. I did something similar with some bar code readers: using a hub, they plug into the USB host port on the Limux side. A Python scrip reads HID events from the bar code reader, and uses the bridge to send them to the sketch. The sketch uses Bridge synchronous Process objects to start two instances of the Python script, one for each reader. The sketch gets the events from the Python script, does some massaging of the data, sends it out the 32U4's USB port and possibly a network socket, and also controls some outputs based on scan activity.
To use a joystick, you will probably have to do something similar: open the USB port on the Linux side, read the data and do some pre-processing, and then forward that information over the bridge to your sketch.