Guys , Do you see any reason way I can not use pwm to

Kurt
There are three tinyG pins in play here

  1. PWM - You get a PWM signal when M3 active NOT APPROPRIATE
  2. SPIN ON/Off - High logic level when M3 active (M5 turns off)
  3. Coolant - High logic level when M7 active.(M9 turns off)

The insertion of M3 and M7 at appropriate points in your GCode is really a function of your GCode generator; some do, some don’t.
Or, you could do it manually.

A separate solution (independent of tinyG) would be to use the CP GPIO server and use your Pi 2 pins to drive relays

I doubt there are packages that would generate appropriate control for the Pi pins automatically, but you could create something on your own using CP Macros or ?

I have doing so reading tonight and I think that I may try the spin on/off and the cool for the vac , I will first install the wiring for the relays and do some testing without using the high voltage side of the relay and hookup my meter to test this so there is very low risk . I need to learn the commands on the tiny g to turn on and off and then worry about being able to control in the g-code.

There are no specific tinyG commands/parameters.
M3 turns spindle on, M7 turns coolant on.
Those are really Gcode commands.

Thank you