Welcome! Log In Create A New Profile

Advanced

serial communication RUMBA to NANO

Posted by DrumClock 
serial communication RUMBA to NANO
May 20, 2020 12:24PM
HI, how do I set up serial communication in Marlin configuration ?
Marlin Bugfix version 2.0.x.



Arduino NANO digital pin 0,1 (RX,TX) to RUMBA digital pin 15,14 (RX3, TX3)

Thanks.
Re: serial communication RUMBA to NANO
May 20, 2020 05:43PM
In Marlin it supports 2 serial ports

#define SERIAL_PORT 0 this is your main usb/serial converter connected to TX0/RX0 on the controller.

Then there is the second serial port, if you set it to 3 it will also accept gcode over TX3/RX3

#define SERIAL_PORT_2 3
Re: serial communication RUMBA to NANO
May 21, 2020 12:29PM
HI,
I enabled the function #define SERIAL_PORT_2 3
the NANO board transmits on the bus (RX LED flashes) but the RUMBA board does nothing.
I'm sending the string "G28" from NANO, but the printer is not responding.
Is it not necessary to set pins 14 and 15 as RX3 and TX3 in the Marlin configuration?
BAUDRATE = 115200 is set on both boards.

program for NANO board in the attachment.

Edited 5 time(s). Last edit at 05/21/2020 01:56PM by DrumClock.
Attachments:
open | download - serial.ino (2.2 KB)
Re: serial communication RUMBA to NANO
May 21, 2020 10:58PM
Your running software serial. this is not good for high speeds. You using the real serial ports pins, use the real serial functions.

eg

const int BAUDRATE = 115200;

void setup() {
Serial.begin(BAUDRATE);
}

void loop() {
Serial.println("G28");
}

"Is it not necessary to set pins 14 and 15 as RX3 and TX3 in the Marlin configuration?"
no its real physical serial port on the controller, not Softwareserial ports.

Edited 1 time(s). Last edit at 05/21/2020 10:59PM by Dust.
Re: serial communication RUMBA to NANO
May 22, 2020 03:32AM
Thank you so much for your help, communication works.



Edited 1 time(s). Last edit at 05/22/2020 05:40AM by DrumClock.
Re: serial communication RUMBA to NANO
May 22, 2020 10:26AM
Hi,
Is it possible to check the status of the printer before NANO sends the "M25" command to the RUMBA board?
It is unnecessary to send "M25" if it does not print from either the SD card or via Octoprin.

Edited 1 time(s). Last edit at 05/22/2020 10:26AM by DrumClock.
Re: serial communication RUMBA to NANO
May 23, 2020 02:21AM
not easily

When printing from sd card or octoprint, the printer has no idea on the concept of printing. It doesn't care if there is another command coming or not.


Only way that comes to mind is to enable ADVANCED_OK, then send a pointless gcode command to get a OK response and examine the buffers. if they are not empty, its doing something.
Sorry, only registered users may post in this forum.

Click here to login