Go Down

Topic: Reading usb data from external device using Arduino Zero (Read 344 times) previous topic - next topic

MicheleMaris

Hi, this time I have a more complicate question.

I would like to read with the native USB port of Arduino Zero the output of a GPS unit which is sent through a usb in output (actually a serial port plus an sub adapter).

In practice Arduino would have to replace the PC.

Is there any library which would help me in doing this task?
Thank you

Mic

gdsports

The Zero/SAMD21 USB port supports USB host mode using a USB OTG to host adaptor/cable but there is minimal software support. Examples for USB keyboard, mouse, and ADK are included but there are no examples or libraries for USB serial devices.

It might be possible to port USB serial code from the USB Host Library 2.0 but quite a bit of knowledge about USB protocols is required. This library is not designed to work on the Zero USB hardware so some changes are required to use the drivers.


MicheleMaris

Mmm ... seems complicate.
Since the GPS board has an RS232 output I wonder if it is possible to have a second serial on Arduino Zero and use it instead.

MartinL

Quote
Since the GPS board has an RS232 output I wonder if it is possible to have a second serial on Arduino Zero and use it instead.
Yes it's possible.

Here's a tutorial by Adafruit on how to add extra hardware serial ports to your Arduino Zero: https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports/creating-a-new-serial.

Go Up