Didier
The Youtube video that Jim suggested gives a good indication on how to import code into a new Node Red Node. I suggest you watch it and the other beginners tutorials in order to get a good basic understanding of how Node Red works.
When you are comfortable with editing your Node Red flows then copy all the code in my second post to the clipboard, and go into Node Red
Use the import function to import my code from the clipboard into your flow
Once you can see the new Nodes in your flow, double click on the "PWM Fan control" function node
If you look at the code you will see some bands/steps that I used to run the fan at various settings depending on CPU temperature
You will see that I have started the fan running at 30% when the temp is above 45 degrees. There are steps at 55 degrees and 60 degrees but at 65 degrees I turn the fan up to 100%
Regards
Steve
The Youtube video that Jim suggested gives a good indication on how to import code into a new Node Red Node. I suggest you watch it and the other beginners tutorials in order to get a good basic understanding of how Node Red works.
When you are comfortable with editing your Node Red flows then copy all the code in my second post to the clipboard, and go into Node Red
Use the import function to import my code from the clipboard into your flow
Once you can see the new Nodes in your flow, double click on the "PWM Fan control" function node
If you look at the code you will see some bands/steps that I used to run the fan at various settings depending on CPU temperature
You will see that I have started the fan running at 30% when the temp is above 45 degrees. There are steps at 55 degrees and 60 degrees but at 65 degrees I turn the fan up to 100%
Regards
Steve