You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to connect a Silabs CP2102 USB to UART Bridge but I do not know how to use this library to connect and send/recieve data. Any minimal example or hints would be appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
+1 I've found it difficult to make it work on my CP2104 USB to UART Bridge. It detects, but not able to read or write any further and lacking documentation to figure it out. Any example would be appreciated as well.
Here is the code I am using:
#include <elapsedMillis.h>
#define USBHOST_OTHER
#include <Arduino_USBHostMbed5.h>
REDIRECT_STDOUT_TO(Serial)
USBHostSerial userial;
void setup() {
Serial.begin(115200);
while (!Serial) {}
Serial.println("Starting Serial test...");
// Enable the USBHost
pinMode(PA_15, OUTPUT);
digitalWrite(PA_15, HIGH);
elapsedMillis em;
while (!userial.connect()) {
if (em > 5000 ) {
Serial.println("No USB Serial device connected");
em = 0;
}
delay(500);
}
Serial.println("Serial connected");
}
void loop() {
// print characters received
while (userial.available()) {
Serial.write(userial.getc());
}
delay(1000);
}
On run, it just spams "No USB host Serial device connected" regardless of any serial dongle that I have tried (FTDI or Silicon labs chip).
Hi,
I am trying to connect a Silabs CP2102 USB to UART Bridge but I do not know how to use this library to connect and send/recieve data. Any minimal example or hints would be appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: