Tell us about yourself!
Sorry got distracted with thinking (/researching/testing) about using a dslr camera shutter instead of a solenoid and bits of card (turns out the camera shutter I bought is solenoid based anyway). I looked into using a pico projector, seemed more expensive for less resolution, although smaller and simpler. There was a laser based non DLP MEMs one that was tempting (no focusing required). Anyway if it is still useful, the pin just provides on and off, M8 on and M9 off.
Currently in bits as I just moved, and I'll have to dig out the laptop to look at the Gcode commands. From memory I used the M8 and M9 coolant control codes but as my rotatory solenoid is not sprung I built an single input inverting H-Bridge to flip the rails. Wouldn't recommend it, see if I can help more after I've dug out some bits.