gnea / grbl-Mega

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
https://github.com/gnea/grbl/wiki
Other
495 stars 229 forks source link

Getting position data from grbl (on Arduino Mega) on another Arduino Uno #172

Open murthybalaji0725 opened 9 months ago

murthybalaji0725 commented 9 months ago

Hi! I read many articles but I could not find something that matches my configuration in this topic. I am running a 3D printer controlled through an Arduino Mega 2560. The Mega and 3D printer are connected through a RAMPS 1.6 shield and DRV8825 motor drivers. The Mega runs grbl-Mega. I have successfully controlled the 3D printer using grbl. I have also successfully tested it by sending gcode through ugs.

I have another Arduino Uno R4 that is connected to another sensor on analog pins. I know that when you send a ? to grbl, it returns with current position data.

I want the Uno to send a ? on the hardware serial pins (pin 0 and 1), to the pins 16 and 17 (hardware serial pins) on mega. The pins 16 and 17 make the serial pin 2 on the mega. I want the uno to send a ? and recieve the position data from the Mega. How can I do this task?

I was testing this by connecting the uno with my laptop and the uno further to mega. I was hoping to read the position data from mega in the laptop in the serial monitor.

Finally, I would store the position data with sensor measurements in an SD Card.

Can anyone plaese help me with this problem.

I would be very grateful.

terjeio commented 8 months ago

This fork may be of help.