Welcome! Log In Create A New Profile

Advanced

Doing action when changing status

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

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,
Maciej
Re: Doing action when changing status
June 12, 2017 11:14PM
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/12/2017 11:14PM by dc42.

Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet [www.duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login