Direct control of RAMPS pins

Hi, all.
I build a small extender for RAMPS that allows me to "tap" into digital pins and switch on/off 12V. Something like the RRD extender for more fans.
I want to use them for turning on/off power source (similar to ATX PS-ON), light and external fan for cooling/venting the enclosed box once the print is done.
The power supply one (the PS-ON pin) is working OK and is controllable by M80/M81.
I'd like to find out if there is a G-code function, that allows me to control directly arduino pins - e.g. I'd like to control the light and fan by pins D16 and D17 and possibly move the PS-ON to that header too.
I know how to move the PS-ON (just by modification of the line #define PS_ON_PIN ORIG_PS_ON_PIN to something like #define PS_ON_PIN 16.
But I cannot find (and I googled) if there is some functionality that would allow me to control the rest of it (light and fan).
Can someone, plz, advice?

Comments

  • M42 can control pins directly. Some pins are prohibited (see pins.h bottom sensitive pins). For lights there is already a function to turn it on/off.
  • Thanks! This is what I needed :) I knew I missed it somewhere and it is described...
    Again, thanks for the great work you do!
Sign In or Register to comment.