Do Duet 3 board have a serial interface?
-
I would like to attach a microcontroller to a Duet 3 board (e.g. Mini) and send it short messages (e.g. 5-20 chars text message) using gcode commands. Is it possible? What interfaces and commands are available?
I found the M260 I2C command and wonder
- How to identify the I2C pins on, let's say, Duet 3 Mini?
- Are there other protocols available such as serial/uart or SPI.
https://forum.duet3d.com/assets/uploads/files/1610230359113-duet3_mini5_wiring.png
-
@zapta Duet 3 main boards have two serial interfaces. However the firmware doesn't yet provide a mechanism similar to M260 to perform general sensing and receiving of data. You can however configure them as input channels that receive GCode commands, return the appropriate responses, and can also output text strings in M118 commands.
-
Thanks @dc42, this is very useful.
I did more research and the requirements are clearer now. The board I will use will be Duet 3 Mini 5+2, and the communication will be in one direction with the Duet sending only (e.g. a short text messages "start.aaa_bbb_ccc\n"). I have a choice between Serial, I2C and SPI (in that order of preference, due to the numbers of lines involved).
With the serial option, and a Mini board + PanelDue , what is the TX output pin of the auxiliary Serial? (and the RX pin, in case I need to reserve or pull it up).
-
Ok, it seems to work. I freed connector IO1 (was x stop on my printer). io1.out is the serial output, and the input io1.in left unconnected and is pulled up internally to 3.3V. (This is on a Duet 3 Mini with RRF 3.4.0). Thanks @dc42. Supporting the \n is a nice touch.
echo "Serial init" M575 P2 B115200 S2 while iterations < 10 M118 P5 S"Hello World\n" echo "Hello World" g4 P500
-
@dc42 said in Do Duet 3 board have a serial interface?:
@zapta Duet 3 main boards have two serial interfaces. However the firmware doesn't yet provide a mechanism similar to M260 to perform general sensing and receiving of data. You can however configure them as input channels that receive GCode commands, return the appropriate responses, and can also output text strings in M118 commands.
Hi @dc42 Can custom gcode commands be triggered via this method too?
If so is there any delay in responding to such commands if the board is executing a print file when the gcode command is sent over the serial interface?
I'd assume it's similar behaviour to using a panel due during a print?
Any thoughts would be much appreciated.
All the best
Barry M -
@CNCModeller yes it's similar to sending a command from PanelDue during a print.