Welcome! Log In Create A New Profile

Advanced

Marlin I2C and Ramps

Posted by cat.farmer 
Marlin I2C and Ramps
December 24, 2014 01:08AM
I have started on a project, the quick of it is - adding a daughter board (Arduino of some model yet undecided) using I2C to control servos and/or actuators. I want to do this on a tool change command.

I can't seem to find much information out there on what happens(in Marlin) when a T0, T1, etc, command is issued. From what I have found is it pauses the print, and retracts and heats the called hotend, it may also move it into position. Is that all done when slicing? What I want to do is assign T(x) command to the I2C bus and have firmware on the daughter board run with it.(no need for head movement).

I can't seem to find where I would "catch" the T(x) command to send it to a wire write.

I can't decide if I am way over thinking this or in way over my head.

Is what I describe doable?
Re: Marlin I2C and Ramps
December 24, 2014 11:54AM
Look in Marlin_main.cpp.
in 'case' command handling look for this line:
else if(code_seen('T'))
which is handling any Tx command and you may write your own I2C handling replacing code here
Re: Marlin I2C and Ramps
December 24, 2014 11:59AM
Excellent.. thank you. That is what I was missing.
I will have to write the I2C code but I could not find where to inject it. Now I can at least move forward in my plan.
Re: Marlin I2C and Ramps
October 09, 2016 05:37PM
I know this thread is probably dead, but I am going to give it a shot anyways.

This is exactly what I need to do. Can you send me a sample of the code you used to implement it?

I have been searching for something like this for weeks.
Re: Marlin I2C and Ramps
October 09, 2016 10:22PM
I pm'd you.
Sorry, only registered users may post in this forum.

Click here to login