Our upgraded system added an Adafruit piTFT resistive touch screen, a piezo buzzer, updated LED light functions, and four GPIO buttons for functions listed above. The full system also includes an RPi 3, a radio antenna, a USB flash drive, and a real-time clock.
piTFT Screen
The piTFT screen served as a user interface for scientists who might want to use the base station out in the field. The base screen displays the most recent tag detected, a scrolling history of the last 9 tags detected, and three toggle buttons: the left-most button, “Scrolling”, toggles to a histogram of the most-frequently detected tags (it displays “Histogram” when in histogram mode); the middle button, “Screen Off”, turns off the screen, and the right-most button, “Brightness”, toggles between three different levels of brightness. A mockup of the scrolling display and histogram is shown below:


GPIO Buttons
The GPIO buttons that came with the piTFT screen were tied to various interrupt based functions. The button mapped to pin 17 allows the RPi to reboot; the button mapped to pin 22 allows the RPi to shutdown, 23 controls beeper noise (on or off), and pin 27 serves as a bailout button, allowing users to exit the main program and enter development mode. All GPIO pins are in BCM numbering.
Beeper
A beeper was added to the system to serve as an audio signal for tag detection, in case a researcher using the base station was unable to see either the screen or the LED flash -- upon tag detection, the beeper emits a short beep.
The beeper is controlled via PWM at 4kHz for the loudest tone per the manufacturer’s suggestion.
The beeper is controllable via the button attached to pin 23, which toggles the duty cycle of the PWM between 0 and 50% -- silencing the beeper or turning the beeper back on is a matter of pressing it.
LED
The LED has three main functionalities: one, to serve as a warning signal for when the RPi is about to mount the USB flash drive, two, to serve as a visual indicator of tag detection, and three, to serve as a base station ‘heartbeat’ -- that is, indicate that the RPi base station program is alive and running.
For the first function, the LED turns on for a full five seconds before the RPi mounts the USB, and remains on until the RPi unmounts. For the second function, the LED blinks four times in rapid succession upon tag detection, and for the third, the LED blinks every five seconds to indicate that the program is currently running.