I have a problem with my homemade fan speed controller powered by an Arduino Nano, which reads a value from Serial (Arduino serial monitor, or Processing sketch) and uses the 0~255 value to set a variable fanspeed1
to set a PWM pin to control the fan speed.
The problem is when I close the Processing sketch, or the Arduino serial monitor, fanspeed1
is changed to max value (the fan speeds up to full speed).
I would like to send serial to set the value and then close the serial monitor, or Processing sketch and the value of fanspeed1
should not change.
If I need to post some code I can simplify my sketch down to a send serial, receive serial, make pin pwm = serial(0~255), but I am guessing there is a simple solution to this unfindable with my googling.
Help please, these fans need controlling...