O'Reilly logo

BeagleBone Home Automation Blueprints by Rodolfo Giometti

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

Setting up the software

Now, it's time to think about the software needed to implement the desired functioning, that is, checking the gas concentrations, logging them, and eventually activating the alarms. We need the following:

  1. A periodic procedure (read_sensors.php) that periodically scans all the sensors and then logs their data into a database.
  2. A periodic procedure (monitor.php) that reads the sensors' data, checks them against preset thresholds, and then sets some internal status.
  3. A periodic procedure (write_actuators.php) that enables the alarms according to the previously saved status.

The following diagram shows the situation:

Setting up the software

The core of the ...

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