O'Reilly logo

Raspberry Pi Home Automation with Arduino by Andrew K. Dennis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Curtain Automation – Open and Close the Curtains Based on the Ambient Light

In this chapter, we will be looking at how to use a photoresistor and a motor shield in conjunction with your Raspberry Pi. Once these are combined into a single device, it can be used to open and close blinds or curtains.

In previous chapter, we used temperature to change a relay's settings and in this chapter, we will use the same concepts, however, we will use a photoresistor to turn a motor on and off.

What you will need for this chapter:

  • Raspberry Pi
  • Raspberry Pi to Arduino bridge shield
  • Breadboard
  • Wires
  • 10 K resistor
  • Photoresistor
  • Arduino Motor Shield
  • 9 V battery and battery connector
  • Flat-head screwdriver
  • A flashlight
  • 9 V DC motor and an optional 12 V DC motor ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required