With my sketch, when I press a blue button the Wio Terminal sends (Serial.write) data out the USBC port. This works when I have a USBC cable connecting the WIO to the PC: Data and Power go through the USBC cable.
The problem occurs when I power the Wio Terminal through the connector on the back, 5V is connected to pins 2 and 6. The Wio Terminal powers up and appears to run fine.
However, there is no data on the USBC port when i press a blue button (verified with scope).
My goal is to use the Wio Terminal as a true “terminal” to monitor RS485 commiunications:
Wio Terminal <–> USBC OTG Cable <–> FTDI USB-RS485 converter.
This setup works when runing a Terminal app on a cell phone.
I think I’ll need USB Host mode for the Wio, correct?
I tried to enable USB HOST mode on the Wio but still no data out the USBC port:
First I installed the USB_Host_Library_SAMD from github.
SAMPLE TEST CODE:
#include <TFT_eSPI.h>
TFT_eSPI tft;
//#include <usbhub.h>
#include <KeyboardController.h>
USBHost usb; //gives error if KeyboardController.h is not included… why??
void setup() {
digitalWrite(PIN_USB_HOST_ENABLE, LOW); //for Host Mode
digitalWrite(OUTPUT_CTR_5V, HIGH);
Serial.begin(9600);
tft.begin();
tft.setRotation(3);
spr.createSprite(TFT_HEIGHT,TFT_WIDTH);
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE);
tft.setTextSize(2);
tft.drawString(“WIO BOOT”,3,0);
Serial.write("WIO BOOT. "); //THIS NEVER SENDS OUT THE USBC PORT
}
void loop(){
}
Thoughts?
Thanks