Writing the Script
The package delivery monitoring script needs to perform several functions, from listening for and reacting to triggers from the package delivery monitoring hardware to sending an email alert about the event and everything in between. Specifically, the script needs to do the following:
Listen for threshold exceeded events (i.e., package delivery and removal) sent via the soft serial port communications between the XBee radios.
Timestamp these events generated by the force sensitive resistor in the deliverystatus table.
If a high value is received (i.e., a package is delivered), query tracking numbers stored in the tracking table. If a low value is received (i.e., a package is removed), send an email alert stating such ...