pmterp
Posts: 2
Joined: Mon Jan 11, 2016 4:11 am

RPi Concession Stand Calculator

Mon Jan 11, 2016 4:37 am

Disclaimer: I do not have much programming experience but am wanting to learn. I'm not looking for someone to do the work for me, just some help in pointing me in the right direction of what it is I need to learn.

Problem: My son plays bball for his small private school. During games a couple willing (or compelled) volunteers man the concession stand where a few of items are sold. There's usually around 10 items (from drinks to candy to hot dogs) with prices ranging from $0.05 - $4.00. Watching some of these "volunteers" struggle with calculating the totals in their heads made me think, "I bet a Pi could handle that!"

Solution: I'm envisioning a Pi with a small attached touchscreen running some type of visual calculator. The volunteer would simply hit the "Candy $0.50" button 3 times, the "Hot dog $0.75" button, and the "Soda $0.50" button and the display would show a total of $2.75. Ideally it would also keep a running tally in the background so at the end of the night, there's a simple on screen report of how many of each item was sold and how much money was collected. Also, in between games, the admin (someone who knows the 4-digit PIN) would be able to edit the button labels and associated amounts, reset the tally, etc.

Any advise, similar projects, or helpful links would be greatly appreciated.

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: RPi Concession Stand Calculator

Mon Jan 11, 2016 9:03 am

Private School and people don't know how to do basic maths...

Sounds like you need a pocket calculator and a tally sheet not a Raspberry Pi.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: RPi Concession Stand Calculator

Mon Jan 11, 2016 9:57 am

You'd want a Pi and a touch screen. There are several touch screens out there but there's no particular reason not to get the official one.
You might have to operate without mains electricity. There are USB power banks now that can run a Pi for many hours on a single charge. I don't know how a touchscreen would reduce that but I'm sure it would last for a few hours.

As for programming, I'd use Python and use TkInter for the GUI and the ConfigParser library to store the button labels and prices. You're probably best off saving the purchase record as a text file in Comma-Separated-Value (CSV) format. Then you can import it into a spreadsheet to analyse it.

Be aware that you need to cater for all the exceptions that happen in human interaction: the guy who is 5 cents short and has to put some candy back, the guy who rings up $50 of goods and then walks away, the guy who adds something else after being told the total, even the guy who buys the expensive shirt then gets whopped over the head by his mom and has to take it back. If you show a list of the current purchase on the screen it would avoid arguments. And, of course, have it calculate change too.

And most importantly remember that whenever you make something foolproof, along comes a better fool.

User avatar
karrika
Posts: 1125
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RPi Concession Stand Calculator

Mon Jan 11, 2016 10:20 am

I would probably make all consumables cost the same ($1 or $2) to keep the math simple. You can always pack small bags of candy instead of selling lollipops one by one.

Using a calculator or a Pi slows things down a lot and you miss lots of sales.

We calculate what is left of lottery, candy, buns after the event to see what the sales were. Hopefully the money coming in is about the same magnitude as the goods we sold.

For the aftermath you can run Libre Office Calc on the Pi.

pmterp
Posts: 2
Joined: Mon Jan 11, 2016 4:11 am

Re: RPi Concession Stand Calculator

Tue Jan 12, 2016 3:58 pm

Thanks for the responses. I know I have a lot to learn but at least now I have some direction as where to start (learning Python). Once I get the project going I'll share my successes in case someone else can use it.

Return to “Other projects”