Products for USB Sensing and Control
It is currently Sun May 19, 2013 10:03 am

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: RFID Stone-Scissor-Paper
PostPosted: Sun Jun 24, 2012 5:33 am 
Offline
Phidgetly

Joined: Thu Mar 04, 2010 2:51 am
Posts: 38
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 56 times
Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group