Page 1 of 1

Turn on LED light

Posted: Fri Oct 10, 2014 10:48 pm
by Jbc
I cant find the proper Gcode to turn on a LED light on pin 6 / Azteeg x5 Pro.
I read in these forums that M146 would do it.
So I placed in the starting script area - M146 P6 S255 == ON
That didnt work.
I used M46 P6 S255 == ON in Repetier and it works.

Anyone know how to turn on a light?
I am running a Cerberus Mega.
jbc

Re: Turn on LED light

Posted: Sat Oct 11, 2014 1:37 am
by TenKOhms
Jbc wrote:I cant find the proper Gcode to turn on a LED light on pin 6 / Azteeg x5 Pro.
I read in these forums that M146 would do it.
So I placed in the starting script area - M146 P6 S255 == ON
That didnt work.
I used M46 P6 S255 == ON in Repetier and it works.

Anyone know how to turn on a light?
I am running a Cerberus Mega.
jbc
Try just
M46 P6 S255
without the == ON

Re: Turn on LED light

Posted: Sun Oct 12, 2014 11:09 am
by Jbc
I tried that but still no light.

Re: Turn on LED light

Posted: Mon Oct 13, 2014 10:54 am
by TenKOhms
Sorry, I went off the last line of G-Code you had in your original post, it looks like it may be M146 P6 S255 instead of M46. Try that in the starting G-Code without the == ON.

I didn't see the M146 command in the RepRap G-Code Wiki(http://reprap.org/wiki/G-code), but from the looks of it, it seems the M146 turns on a pin the corresponds to the P#, where number is the pin turned on. Pin 6 on most Arduino style boards have PWM capability, and the S255 is just saying to give it 100% duty cycle meaning a full on.