I have a problem with my homemade fan speed controller powered by a arduino nano, thatan Arduino Nano, which reads a value from Serial (arduinoArduino serial monitor,or processing or Processing sketch) &and uses the 0~2560~255 value to set a variable "fanspeed1"fanspeed1 to set a PWM pin to control the fan speed.
The problem is when I close the processingProcessing sketch, or the arduinoArduino serial monitor, the "fanspeed1"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 processingProcessing sketch and the "fanspeed1" value of fanspeed1 should not change.
If I need to post some code I can simplify my sketch down to a send serial,receive receive serial,make make pin pwm = serial( 0~2560~255), but I am guessing there is a simple solution to this unfindable with my googling.
Help please, these fans need controlling.........