I'm making a escape game and wish to create a shelf (or similar) such that the raspberry pi will execute some code only if the certain books are put on the shelf in the correct order.

How may I go about doing this (as cheaply as possible I might add!)?

NOTE: I am a noob when it comes to hardware, although experienced in programming, so please be as detailed as you can in terms of what I need.

Thanks for any ideas.


I had a few partial ideas.

From the research I've done so far the best way I can see doing this is to detect which book is being used through have 3 NFC readers or some sort of weight sensor to detect which book is on (assuming each book has a different weight)

  • 1
    You need to be careful - your question is rather broad and might get closed. It is better to focus on one solution, show us what you've already learned/investigated, and ask specific questions regarding problems or concerns. As it is right now, you will get opinions at best. – Phil B. Sep 29 '15 at 15:55
  • 1
    That said - I'd focus on RFID/NFC tags. Look at the cheap RFID tag readers on seeedstudio.com - their reading distance is no more than 10cm. Stick the antennas on the shelf (or inside books that are fixed to the shelf), stick a tag in each book to be recognized, and join all readers to your Pi. Doing so requires more than one UART, so you need to look for software UART solutions. Alternatively, you can look at this question to see how you can handle multiple RFID readers on 1 rPi (up to 4). – Phil B. Sep 29 '15 at 16:00
  • That's helpful, however I am very confused in terms of inputs. For example, the NFC reader I was looking at was this: goo.gl/reBCgo . It looks like it takes 20 pins (please correct me if I'm wrong). Is there a way to extend the PI to provide more pins (my research said something about port expanders). Also in your question you mentioned 3 things: antennas, tags and readers. I'm sure I know what the tags and readers are, but what's the antenna? – Yahya Uddin Sep 29 '15 at 17:06
  • 1
    I don't know what that 20pin header does on that card - but look at the other header on the card - it provides individual breakouts for things like SPI and I2C. That's where you want to connect. The card you show uses the same underlying chipset (NXP PN532) as the Adafruit I mention in the post I linked to, and has the same set of switches (SET0 and SET1) allowing you to buy multiple cards, use one as UART (TX + RX pins), one as I2C (use SDA+SDL) and 2 as SPI (use MO+MI+SCL?). Alternatively, consider a USB NFC reader and this post – Phil B. Sep 29 '15 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.