Another newbie question here - please be patient!
I am building a unit for auto-closing a top-hung window whenever it rains. This will involve turning a pulley on a stepper motor a certain number of times when activated by a rain sensor, using an Elegoo Uno R3 and a Pololu High-Power Stepper Motor Driver 36v4.
So far, I have successfully used a rain sensor Arduino sketch to beep a beeper when the sensor becomes wet; and I have set up my stepper motor so that it responds to Pololu’s basicsteppingSPI sketch. So the basic electronics and mechanicals are in place.
What I need to do now is to combine versions of these two sketches in such a way that every time the rain sensor gets wet, the stepper motor turns x times, then goes to sleep until it is reset.
Is anyone aware of a single sketch that I could use/adapt to do this?
If not, what would be the best approach for a complete newbie?