1

I'm starting fiddling with a Due but I can't seem to be able to communicate over USB with it. Here is my code:

int bauds = 9600;
void setup() {
 SerialUSB.begin(bauds);
}
void loop() {
 if (SerialUSB.available()) 
 serialUSBEvent();
}
void serialUSBEvent() {
 String str = SerialUSB.readString();
 SerialUSB.write(str.c_str());
}

As you can see, I try with the bare minimum but my output consoles (2 COM port for the 2 usb connections, just in case I messed up which is which) stay blanks, whatever I send them...

dda
1,5951 gold badge12 silver badges17 bronze badges
asked Oct 16, 2016 at 16:02

1 Answer 1

1

Have you tried resetting the board after sending the program? Or after having opened the terminal?

A few days ago I didn't have any results using SerialUSB, and today I have. The program has been sent trough the programming port, and SerialUSB is with native port. Uploading my program trough native port, it didn't worked until I reset!

dda
1,5951 gold badge12 silver badges17 bronze badges
answered Nov 9, 2016 at 18:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.