Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,262 Views

Whats another method for debugging/serial coms when using OTG port

Jump to solution

I've been writing a program using Arduino IDE. And normally you would just use the console on there to send your messages or data to use for debugging using Serial.print() ect... and it would show up on the console in Arduino IDE.

I am using a serial device connected to the OTG usb-A port on the arduino breakout board. That took me a while to figure out but I accomplished with this.

RingBuffer rx_buffer_AVT;

TTYUARTClass SerialAVT(&rx_buffer_AVT,3,false);

SerialAVT.init_tty("/dev/ttyUSB0");

SerialAVT.begin(115200);

But with this being the main part of my sketch, I am no longer able to use the Arduino IDE console as when the switch is flipped to use the USB-A port, the standard one that you plug the computer into no longer functions. Therefore no more Arduino Console.

At the moment I am just looking for something else that's similar to the console window that I can print to so I can debugg my program.

Thanks!

0 Kudos
1 Solution
idata
Community Manager
57 Views

Ok, I figured out that I can use the serial port near the edge of the board using Serial2. I just have to delay the sketch until the boot finished (I have it set at about 12 seconds.) This will then display my messages to the putty window. My problem was the sketch was failing before it ever made it to the void setup() and thats why I was never getting any output. Solved that and now everything is good.

View solution in original post

1 Reply
idata
Community Manager
58 Views

Ok, I figured out that I can use the serial port near the edge of the board using Serial2. I just have to delay the sketch until the boot finished (I have it set at about 12 seconds.) This will then display my messages to the putty window. My problem was the sketch was failing before it ever made it to the void setup() and thats why I was never getting any output. Solved that and now everything is good.

View solution in original post

Reply