The Package Delivery Sketch

The code for this sketch is a variation of the code we wrote for the Tweeting Bird Feeder. One of the neat things about Arduino-centric projects is once you have written a sketch for a sensor or an actuator, the logic and syntax for the sketch can frequently be reused. After all, the basic principles of sensors and actuators are essentially the same—only the type of sensor or motor hardware and values have changed.

Since we already discussed the majority of the code in this sketch from the Tweeting Bird Feeder chapter, we’re not going to spend a lot of time reviewing it. But the one variable worth mentioning is force_value. Like the other sensors we used in the other projects, you will need to calibrate the force ...

Get Programming Your Home now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.