The snail mail notificator works on a very simple principle: a MCU is programmed to send a payload when a pin change interrupt occurs, triggered by the opening of the mailbox lid by the postman via a switch, the transmitter system consumes next to no power. Once the receiver gets the payload it will forward it somehow, the ultimate goal is to send an e-mail informing the arrival for regular mail via e-mail. How would one implement such a system with V-USB on the receiver side?
I have thought of a couple of solutions, but cannot decide on what's best:
- Use the HID keyboard example to send a key sequence (shortcut) that will invoke a script (configured by me) that sends the e-mail. The computer would be my Raspberry Pi media center that is always on anyway.
- Somehow make a receiver script (driver?) on the computer side that listens to the device. That however I don't know how to do yet.
- Poll the receiver to see if it has gotten any data recently using the HID data example.