0

I want to use Arduino DUE board as a FTDI programmer.

The task is to program ESP32 module which is connected to the Arduino Serial port.

I can use only DUE Native port. There is no DUE programming port in my design.

asked Jan 6, 2017 at 9:19
2
  • Cool story dude. Why do you mention this? Commented Jan 6, 2017 at 9:27
  • Forgot to ask. Is it possible? Commented Jan 6, 2017 at 9:29

1 Answer 1

1

Yes, it is possible, and not too difficult.
Also, the native port is a lot faster than the programming port ;)

All you need to do is to read the serialUSB data in and write it to the SerialX port, and read the data in from the SerialX port and write it to the SerialUSB port. It's best to do it on a byte by byte basis, and the due should be plenty fast enough.

This code should do the job. Let me know if it doesn't, and I'll take a look. (I have a Due and esp32)

void setup(void) {
 SerialUSB.begin(9600); //speed here doesn't matter as far as I am aware.
 //the serial baud here should match the speed that 
 //you try to upload at to the esp32 
 Serial1.begin(9600); //change the Serial port to suit your needs
}
void loop(){ 
 if(SerialUSB.available()> 0){
 Serial1.write(SerialUSB.read());
 }
 if(Serial1.available()> 0){
 SerialUSB.write(Serial1.read());
 }
}
answered Mar 30, 2018 at 4:10

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.