The Delivery Processor

Once again, we’re going to borrow from the code we wrote in Chapter 5, Tweeting Bird Feeder. We’re going to copy the serial monitoring and SQLite database connectivity instructions and enhance the script with additional functionality. First, we’re going to add the ability to scan a database containing known tracking numbers of packages in transit. When a delivery notification is received via the XBee/FTDI serial port connection, we will wait several minutes before iterating over the tracking numbers to determine which package was delivered. This delay can sometimes take an hour or more with some couriers. In the case of the US Post Office, it can take up to a day, making lookups on USPS deliveries impractical for our ...

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.