Hello I am trying to send serial command from Arduino Due to Arduino Uno. I connect Arduino Due's native connector to Arduino's USB connector via a micro usb to usb-b converter cable. I expect writSerialUSB.println("Open") line of DUE's code tell to UNO which listens and has serial.begin(9600). I test DUE's and UNO's separately with their codes on my computer. DUE sends command and UNO listens commands. But when I connect each other. UNO does not triggered. Any suggestion? Thank you
May we ask for a link to that Arduino Duo? I don't know such a board and the Arduino site doesn't list it.
That won't work. USB isn't a comparable to an UART connection. On USB one device is the master (host) and all others are slaves. Although the Due can act as a host (the corresponding library is called USBHost) you cannot expect it to support every USB device you want to connect. By default it has support for HID devices like mice and keyboards. I'm not aware of a library that implements any serial profile.
Yes, it does.
https://www.arduino.cc/en/hardware#classic-family
Thank you for replies. Sorry I don't know why write UNO as DUO but it is UNO. I aim to connect DUE and UNO boards. I know that DUE is using 3.3V TTL and UNO is using 5V TTL. I avoid to communicate DUE and UNO boards UARTs. That is why I try to connect these two with Native USB port of DUE and Programming USB port of UNO.
After your answers I understand that it is not possible or easy to connect each other via USB ports.
Could you suggest me a way to connect both DUE and UNO to achieve command type communication?
You can connect the UARTs but you need a level converter in-between. The easiest is a voltage divider on the TX of the UNO (22k in series with a 33k to ground, connect the Due's RX between the two resistors). Connecting the Due's TX directly to the UNO's RX does no harm to the two boards and if they are close together the voltage level is sufficient to trigger a high on the UNO.
May we ask why you think it's necessary to connect the two Arduinos?
Thank you I will try the voltage divider. I am trying to measure light intensity. I have an analog light intensity sensor and LED driver. DUE has 12bit DAC and UNO has 5V logic for LED Driver.
That's an overly complex and quite expensive solution for that. If the sketch fits into the UNO flash and doesn't use lot's of RAM it's much cheaper to add a DAC chip to the UNO if a PWM solution with a filter doesn't provide a good enough signal.
Voltage divider works and I sent commands from serial3 of Arduino DUE to Arduino UNO. Thank you @pylon .
I am afraid of wiring analog devices. I think they are quite noise sensitive. But thank you for advice.
Have you been successful with this project yet?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.