GCode to set PWM output on a pin?

23 views
Skip to first unread message

ajfisher

unread,
Jun 29, 2015, 9:13:52 AM6/29/15
to connected-commu...@googlegroups.com
Howdy all.

Google fu doesn't appear to want to help me on this. I have a RAMPS board which I have set up to use one of the Servo Pins (pin 6) to send a PWM value out.

I have Marlin running on the arduino / RAMPS. It's the latest release version.

What I am trying to work out is how to use GCode to set the PWM value of the pin.

I naively assumed it would be something like `S## PIN_NO VALUE` or something similar but I can't turn anything up.

Cheers
Andrew

Robert Powers

unread,
Jun 29, 2015, 9:20:18 AM6/29/15
to connected-commu...@googlegroups.com
See the code in Marlin in Marlin_main.c for M42 with an S modifier (ex. M42 S128)

I think we lifted something like that for the M3 code on the laser/mini-mill.

Cheers,
Bob

--
You received this message because you are subscribed to the Google Groups "Connected Community HackerSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to connected-community-h...@googlegroups.com.
To post to this group, send email to connected-commu...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/connected-community-hackerspace/c036a708-72c2-4ae6-a1c9-386f15fe148f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

peter zwag

unread,
Jun 29, 2015, 9:32:48 PM6/29/15
to connected-commu...@googlegroups.com
Im also looking to have a out of filament switch which pauses printing. Anyone know how to do this?
Reply all
Reply to author
Forward
0 new messages