Hello, I am trying to control a stepper motor using the results of a temperature sensor. I want to do it so it acts as an automated window, where if the temperature is too cold or hot, the window closes (or stays closed), and if the temperature is nice, the window opens.
I'm not entirely sure how to write the code for the stepper motor portion of this. It's a 200 step, 1.8 degree motor. So I kind of want...
Window starts closed If temp is less than 18 C, window closes or stays closed If temp is greater than 30 C, window closes or stays closed If temperature is between those two values, it opens, by turning the motor 199 steps.
Any help is greatly appreciated. I sincerely thank anyone for their help.