Skip to content

Repository files navigation

mini casino

a tiny casino on an arduino uno. tap an rfid card, pick black, red or green, watch three leds spin and let the buzzer celebrate. balances live in the uno's eeprom, so the card is just your key.

how it works

parts

part notes
arduino uno atmega328p
rc522 rfid reader runs on 3.3 v, any mifare card or tag works as key
16x2 lcd (hd44780) parallel, no i2c, 10k pot for the contrast
3 push buttons black, red, green, no resistors needed
3 leds + 3x 330 Ω any colours, they stand for black, red and green
passive buzzer + 330 Ω optional, plays the jingles

wiring

wiring

get it running

  1. open MiniCasino/MiniCasino.ino in the arduino ide. mfrc522 is bundled, liquidcrystal comes with the ide.
  2. pick arduino uno and your port, upload.
  3. tap a card. new cards get 100 points, then press a colour.

the game

  • stake is 10 points. black and red pay 2x, green pays 9x. odds are 45 / 45 / 10 %
  • hold black to change the stake, hold red to log out, hold green for the volume
  • a session ends after 60 s without a button press, tap the card again to continue
  • up to 31 cards fit into the eeprom, every account keeps two crc protected copies

switches at the top of the sketch: CASINO_SOUND_MODE (0 off, 1 passive, 2 active buzzer), CASINO_EURO (€ or pkt on the lcd), CASINO_SIM (run without the rc522), CASINO_NACHLADEN (refill all accounts once) and CASINO_EEPROM_LOESCHEN (wipe everything once).

extras

  • admin panel: double click Panel starten.bat (or run python admin/panel.py) and open http://127.0.0.1:8080. see and edit every balance over usb, ban cards or make one an admin card with unlimited credit. works on a raspberry pi too.
  • no hardware yet? run python simulation/build_sim.py and paste the output into wokwi. four buttons stand in for the cards. details in simulation/README.md.
  • build check: python pruefen.py compiles for the uno and runs the compile time tests, no upload needed.

case

a 3d printable console for the whole build, two parts, no supports. stl files, the parametric model and the print notes live in case/.

▶ open the 3d model in your browser. it plays the game with the real firmware logic, shows every wire and the electronics inside, and has the admin panel built in. the same page lives in the repo as case/viewer/index.html and works offline.

case layout

more docs (german)

ANLEITUNG.md wiring in detail · SPIELPLAN_V8.md rules and pins · SOUND_V9.md buzzer · LOG_ANLEITUNG.md serial log · TESTPLAN.md test plan

lf7 project by felix grad and nikita lupalo, bbz aifs51. the graphics are generated by docs/make_graphics.py.

About

Duo Project from Felix Grad & Nikita Lupalo

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages