A good cents exit survey
A Penny for Your Thoughts
![© Lead Image © olegdudko, 123RF.com © Lead Image © olegdudko, 123RF.com](/var/linux_magazin/storage/images/issues/2018/216/raspberry-pi-penny-counter/123rf_48095977_penny_olegdudko_resized.png/735679-1-eng-US/123RF_48095977_Penny_olegdudko_resized.png_medium.png)
© Lead Image © olegdudko, 123RF.com
Get feedback for live events with an exit survey that counts pennies.
To generate useful feedback for live programs at the Fort Worth Museum of Science & History's Noble Planetarium on the campus of Central Texas College in Killeen, Texas, we conceived, designed, and built a custom feedback system centered around pennies. The goals were (1) ease of use for both guests and staff, (2) a fast participation process, and (3) immediate feedback to the presenters and managers.
The Guest Experience
When you attend a planetarium show at the Noble Planetarium, you are handed a penny on the way into the theater. As a part of the show, we ask you to hold out the penny at arm's length and imagine that you are looking through Abraham Lincoln's eye. That approximates the field of view of the Hubble Space Telescope, which is the frame of reference for the remainder of the program.
As you exit the theater, the presenter has rolled out an interesting device that looks sort of like a coin bank (Figure 1). You are invited to return the penny in one of five slots to indicate how much you liked the show. As the pennies are returned, they are tallied by the machine; once everyone has exited, the presenter submits the counts, which are immediately visible on an internal web page.
![](/var/linux_magazin/storage/images/issues/2018/216/raspberry-pi-penny-counter/figure-1/735682-1-eng-US/Figure-1_large.png)
Hardware and Software
The funnels and case for the penny counter were designed using Blender [1] and printed with a 3D printer [2]. The completed counter is shown in Figure 2.
![](/var/linux_magazin/storage/images/issues/2018/216/raspberry-pi-penny-counter/figure-2/735685-1-eng-US/Figure-2_large.png)
Under the hood, the Penny Counter's brain is a Raspberry Pi. A two-line by 16-character LCD display shows a menu for the operator; five buttons in a cross pattern provide navigation, and five GPIO pins read infrared sensors at the bottom of each funnel that watch for pennies. The Penny Counter's code is written in Python. It connects to a MySQL database to retrieve show names and post the finished tally after all of the guests have departed.
The Rasp Pi was connected to a generic printed circuit board (PCB) that breaks out the connections from the GPIO header to spring-loaded European-style terminal blocks (Euroblocks), which makes the slot sensors themselves easily interchangeable, as well [3]. The buttons also were wired into spring-loaded Euroblocks. The LCD display was mounted between the buttons and the PCB (Figures 3-6).
![](/var/linux_magazin/storage/images/issues/2018/216/raspberry-pi-penny-counter/figure-3/735688-1-eng-US/Figure-3_large.png)
![](/var/linux_magazin/storage/images/issues/2018/216/raspberry-pi-penny-counter/figure-4/735691-1-eng-US/Figure-4_large.png)
![](/var/linux_magazin/storage/images/issues/2018/216/raspberry-pi-penny-counter/figure-5/735694-1-eng-US/Figure-5_large.png)
![](/var/linux_magazin/storage/images/issues/2018/216/raspberry-pi-penny-counter/figure-6/735697-1-eng-US/Figure-6_large.png)
Software
The Penny Counter is powered by a Python script that monitors the coin slots and buttons and displays information to the user on a small LCD display. The complete penny.py
script [4] is available at the Linux Magazine website.
The script begins with several import
statements, demonstrating how Python includes libraries with additional functions and methods (Listing 1). The as
keyword at the end of lines 4 and 6 creates an alias for easier reference to these modules. The libraries needed for this project are:
Listing 1
Import Statements
serial
– Allows access to serial ports. In my case, this is a USB device that emulates a serial port.time
– Gets current time information.curses
– Lets me put text at specific terminal coordinates and captures keypresses. I used this library to simulate the Penny Counter before all of the hardware was built.MySQLdb
(mdb
) – Accesses MySQL databases.datetime
– Gets information about the current date and time and supplies functions to perform calculations.RPi.GPIO
(GPIO
) – Accesses the 40-pin GPIO header on the Rasp Pi.os
– Talks to the underlying operating system on which Python is running. In my case, it is Raspbian, but it could also be Windows or other Linux distributions, depending on your hardware and host system.subprocess
– Starts secondary threads for parallel processing.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.