O'Reilly logo

Learning Banana Pi by Daniel Blair

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

Interacting with light

One of my favorite sensors to use in projects is a precision light sensor. What this will do is send a signal when it detects light. We will use the precision light sensor by Phidgets. However, you don't need to use this particular brand. The following image shows a light sensor:

Interacting with light

To get started, we will need to install the Phidgets driver and the RubyGems required to interact with the sensors. We will then write a generic Ruby script that can work with most of the sensors and that we can modify to do other stuff later. This script will look for sensors that are connected to a main control board and then move a servo. First, ...

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