Background
Do you have a gambling addiction?
Do you wish to experience the thrill of the casino anywhere, anytime?
Well, now you can with Pocket Casino!
What is Pocket Casino?
All it takes to create the game is to pair an LCD with 2 buttons and a buzzer. It’s amazing how we can organize these components and with an idea develop a functional product.
Pocket Casino comes with 4 adrenaline-inducing, addictive games designed to waste your time keep you hooked for hours. Some are chance-based whilst others test your skill. All the games are easy to learn and can be played in quick rounds, encouraging repeated gameplay.
- Slots
- Coin Flip
- Hi or Low
- Dice (Craps)
I’ve gone to great lengths to recreate the authentic casino experience. Pocket Casino has a fully-functional betting system, pay-out system and addictive tunes.
What’s missing?
- Store: Pocket Casino has a funds-earning system however, there is no store where you can redeem them. This makes the accumulation of funds useless and destroys any incentive to keep playing. Pocket Casino v2 would add a store where you can cash in your earnings.
- More games: Roulette, Blackjack, poker. However, a different display may need to be used as 2*16 maybe insufficient for resolution.
- Hidden Treasure mini-game for slots: If the reels land on a unique combination, the user triggers a hidden mini-game. 3 treasure boxes appear on the 3 reels. The user navigates using the two buttons to open each one.
- Free spins: To play a game, requires a certain amount of funds. The firmware can be expanded so each instance of a game has a random chance to award free spins.
- Advanced display: Modern slot machines use TFT displays, delivering a richer and more immersive experience.
- In Dice, the game doesn’t depict what numbers the two die landed on. Adding this would be nice.
- Unique rolls: In real-life craps, each roll has a name. Recreating this would make for a more realistic and engaging gameplay experience.
- Additional betting options: In Hi or Low, the player doesn’t guess whether the card is black or red or if it is odd or even. Adding these options would add spice to the gameplay.
- Adding the Joker card: Code in a random chance for a Joker card to appear in Hi or Low. The event associated with this is unclear. The most unoriginal idea would be a bonus payout.
- Comprehensive Statistics: Player can see amount of games played for each game, amount earnt, amount lost, how many times they’ve hit the jackpot in Slot, how many times they landed on each die combination in Craps etc. This feature has lots of potential.
- EEPROM: Store high-score and credits in EEPROM, allowing the user to return for another game session.
Slots
The LCD presents three reels that depict different icons By pressing the button, you spin the wheel. The player earns a payout depending on how many matching icons the reels land on.
The higher the bet, the higher the payout. No risk no reward baby!
The icons on the 3 reels rapidly change to emulate spinning the wheel. A tune from the buzzer dramatizes this event.
There are five possible glyphs stored in SYMBOLS. Therefore, given 3 reels there are 5^3 = 125 unique combinations of icons the user can land on.
static const uint8_t SYMBOLS[REEL_SYMBOLS] =
{
GLYPH_CHERRY, /* 0 */
GLYPH_BELL, /* 1 */
GLYPH_SEVEN, /* 2 */
GLYPH_COIN_H, /* 3 */
GLYPH_DICE_PIP /* 4 → maps to CGRAM slot 7 */
};
The user can bet in increments: 1, 5, 10, 25. The reels spin for 800 / 1100 / 1400 ms before stopping one by one.
The Payout Table
| Result | Payout |
|---|---|
| Three Sevens | 50× bet (JACKPOT!) |
| Three-of-a-kind (any) | 10× bet |
| Two-of-a-kind | 2× bet |
| No match | 0 (lose bet) |
Coin Flip
Coin Flip. Predict Heads or Tails and watch in anticipation which side the digital coin lands on. The LCD simulates the flipping of the coin.
Hi or Low
This game can be understood by its name alone. The player receives a card. The house draws a random card from a deck of cards. The player takes a stab in the dark, guessing predicting if the random card is higher or lower than the player’s existing card.
The player doesn’t guess whether the card is black/red or if it’s odd/even. This has been added as a future feature.
Theory
A standard card deck is composed of numbers 1 (Ace) – 10, Jack (11), Queen (12) and King (13). This adds up to 13 cards. Each card has a variant for Club, Diamond, Heart and Spade. Thus, a standard card deck has 13*4 = 52 unique cards.
Dice (Craps)
Predict whether a dice roll of two dice will be over, under, equal or a double.
Payout Table
| Target | Win Condition | Payout |
|---|---|---|
| DOUBLES | Both dice same | 5× bet |
| OVER 7 | Sum > 7 | 2× bet |
| UNDER 7 | Sum < 7 | 2× bet |
| EXACT 7 | Sum = 7 | 4× bet |

When two 6-sided die are rolled, there are 21 unique combinations, disregarding same outcomes (e.g. [1,2] and [2,1] are unique but the summation is identical. This is disregard).
In real-life craps, these combinations have names such as Snake Eyes, Hard Four and Midnight. The full list is below. Recreating this would make for a more realistic and engaging gameplay experience.
The mathematics of Craps
(I’ll entertain myself here). I mentioned there are 21 unique combinations. However, there are 6*6 = 36 possible combinations. In this case, [2, 6] != [6, 2]. The rarest combination is [1, 1] and [6, 6] with a 1/36 or 2.76% chance. This is because this combination isn’t bidirectional. For example, to roll a sum of 3, you can do [2, 1] or [1, 2].
The summation of a dice roll varies between 2 – 12. 7 is the most common with a 16.67% chance.
Hardware Connections
The schematic is available at my GitHub repository.
- LCD configured in 4-bit mode
- 2 buttons provide the navigation for the menu. Software, internal pullups enabled
- Buzzer provides audio feedback and chirps according to gameplay events.
The Software
Full source code is located in my GitHub repository.






