Welcome! Log In Create A New Profile


Doing action when changing status

Posted by maczar 
Doing action when changing status
June 12, 2017 11:08AM

That questions propably go straight to DC42.
I'm modifying RRF running on Duet WiFi to suit my needs better. I want to call a specific function (turn on/off leds and change the fans opening configurations) when the printer changes status ex. goes from Idle to Printing.
Where should I look to implement those functions? I'm familiar with C++, just can't find place in code where it's implemented.

Second question: Is it possible to configure more pins to act as a PWM ones? I found a piece of code in CoreNG folder that is responsible for configuration, but didn't have time to check it yet.

Thanks in advance,
Re: Doing action when changing status
June 13, 2017 02:14AM
I would put that code in Platform:: Spin. There is a function in class RepRap that evaluates the status and you could call that.

If you are not using a DueX expansion board then you have 5 unused heater control outputs on the expansion connector that you can use for controlling LEDs with PWM. If you do have a DueX board then you have the 5 extra fan outputs.

Edited 1 time(s). Last edit at 06/13/2017 02:14AM by dc42.

Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login