RFID Stone-Scissor-Paper

Any other Phidget projects you've done not related to the above subjects
frodegill
Phidget Mastermind
Posts: 114
Joined: Thu Mar 04, 2010 2:51 am
Contact:

RFID Stone-Scissor-Paper

Postby frodegill » Sun Jun 24, 2012 5:33 am

As a small presentation of Phidgets RFID at work, I implemented a very basic version of Stone-Scissor-Paper game. I taped RFID tags to a stone, a scissor and a piece of paper, and had it running in fullscreen kiosk-mode with only a monitor and the Phidget RFID reader as UI.

In kiosk-mode, a RFID tag is used for exiting the application. The sourcecode attached here will use ESC key instead of this tag. Defines to toggle support for fullscreen mode and ESC key can be found at line 34-35 of RFID-game.h

To actually have some use of this application, you need the PhidgetRFID (1023) and at least 3 RFID tags (4 to run in kiosk-mode).

To compile it, first do a "sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev" (I think this should be enough..). Then just type "make"

Attach PhidgetRFID, start the application by typing "./RFID-game", and initialize the application by placing the given RFID tags near the reader. After initializing, place either stone, scissor or paper RFID tag near the reader to place your bet. Computer will make its bet, and result is shown on screen.

Source is public domain, and includes font covered by http://dejavu-fonts.org/wiki/License


The source code can also give you hints on how to use Phidgets in a C++ environment, and how to combine Phidgets and SDL.
Attachments
RFID-game.tar.bz2
(701.24 KiB) Downloaded 290 times

Return to “Other”

Who is online

Users browsing this forum: No registered users and 2 guests