Is there any way to use a UART on the raptor to communicate with a USB device?
For example, if I wanted to use the USB interface of a pololu mini servo controller that has a mini-usb connector.
Physically, the USBHost module has a USB port, but it looks to be only for HID/Storage devices, and not usable as a serial port.
The USB Serial Module has a micro USB connector, so it looks like it is USB-client not USB-host (can’t connect it to another micro-usb connector)
Is there any convenient solution for this? I realize I could just use the ttl pins on that servo controller, but I’d like to see if there was a way to use the usb.
USBHost has a Serial connection method. But that requires that what you plug in actually offers a serial port - do you know that the Pololu device is a serial device ? If so, USB Host is the way to use it. https://www.ghielectronics.com/docs/36/usb-host#317
It would have been nice if there had been a link to that page from the USB Host Module pages. There is no example/tutorial/developers guide listed in the resources there. I was limited to looking through the intellisense list looking for anything to do with serial.
Controller is a USBHost module, but there is no "UsbSerialConnected" according to intellisense...
There are events for KeyboardConnected MouseConnected,MassStorageMounted etc
but no UsbSerialConnected.
What am I missing?
I misread the code in the tutorial… I thought “Controller” was the name of the instantiated usbhost module object itself. I was trying like this:
In order to use the Serial functionality you need to use the [b]static[/b] GHI.Usb.Host.Controller object like this:
```cs
GHI.Usb.Host.Controller.UsbSerialConnected += Controller_UsbSerialConnected;