Go Down

Topic: My Completed blind controller project (Read 211 times) previous topic - next topic


Just posting up my code for my "open the blinds at dawn" project https://paulmurray.wordpress.com/2015/04/03/machine-7/.

It features time slicing - while the motor is winding the blinds, you can hit a button at any time to stop it. To make that happen, I ignored the existing Stepper class and rolled my own - surprisingly easy.

I used a C++ class to encapsulate "a buttton that goes up and down", and extended it to implement "a button that knows about clicks and double-clicks".

Anyway. It all seems to work. Main thing missing is telling the board to sleep. I was powering the board with 4 AA batteries, and they went flat after 3 days. Now I have a 6v power supply. Could have used a USB power supply, but they were a bit more expensive. Apparently it's pointless sleeping the board anyway, because the USB socket chews power.

The stepper motor is powered with a pair of 6v lantern batteries. I'll see how long they last.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131