Introduction: WHAT!!! a Dice Machine!

Hello, Today I′m going to show you how to build a Dice machine with Arduino.

This is a versatile and interactive device designed to provide a random number generation experience with a touch of simplicity and fun. At the core of this device is an I2C LCD screen that serves as the user interface, guiding users through the process seamlessly. When powered on, the screen prompts the user to "input 1 to 20," inviting them to select a number within this range using the 4*4 thin keyboard. Once the desired number is input and confirmed by pressing the 'D' key, the Dice Machine takes over.

If the entered number exceeds 20, the screen promptly displays an "Error" message, ensuring the user stays within the specified limits. Upon a valid input, the device generates a random number between the entered number and 1, displaying this random value on the LCD screen. This feature transforms the device into a digital dice, ideal for games, decision-making, or simply enjoying the thrill of randomness.

To start the process anew, the user simply presses the 'C' key, resetting the system and allowing for a fresh input. This intuitive reset function ensures continuous and uninterrupted fun, making the Dice Machine a user-friendly and engaging gadget for all ages. Whether for gaming, learning, or entertainment, the Dice Machine combines technology and simplicity to deliver a unique random number generation experience.


Now, let us get started!!!





Supplies

  1. Arduino Leonardo Board x1
  2. LCD Screen x1
  3. 4*4 KeyBoard x1

Step 1: Code

This is the code I wrote.

Attachments

Step 2: Wiring

Step 3: Finished Dice Machine

Attachments