This is an old revision of the document!


True Random Number Generator

Ionacu Teodor Alexandru 1222A

Introduction

Introducing the Dice Game with Temperature Sensor! This interactive project combines the excitement of a dice game with the unpredictability of temperature fluctuations. By integrating a DHT temperature sensor, each roll of the dice is influenced by the current temperature reading. As you press the button, LEDs flicker, a buzzer plays a slot-like melody, and the dice display a number affected by the temperature, offering a unique and immersive gaming experience. Let the temperature shape your luck and add a new dimension to your gaming adventures!

General Description

The Dice Game with Temperature Sensor is an intriguing project that combines the excitement of a dice game with the concept of true random number generation. Unlike traditional dice games that rely on predictable outcomes, this project introduces a temperature sensor to add a touch of unpredictability. The temperature reading influences the generated number, making it more akin to true randomness. By incorporating the ambient temperature into the randomization process, the project mimics the characteristics of natural random events, similar to true random number generators used in various applications. This unique feature brings an element of surprise and authenticity to the game, providing players with a more immersive and engaging experience. Whether it's a casual game among friends or an exploration of random number generation, this project offers an exciting blend of electronics, chance, and scientific principles.

Hardware Design

Components

  • MQ-3 sensor
  • Arduino UNO board
  • Buzzer
  • Button
  • LCD display with I2C module
  • Breadboard

Physical Project

Software Design

Libraries used
  • <Wire.h>
  • <LiquidCrystal_I2C.h>
Funcții implementate:
  • void setup():
    • Declare the pins
    • Initialize the LCD display
    • Display the initial text (“Press the button”)
  • void loop():
    • Verify if the button has been pressed
    • If the button has been pressed the Buzzer starts and makes a noise every second for 5 seconds
    • The LCD displays that the sensor is reading
    • After 5 seconds the buzzer stops
    • The code computes the average value read by the sensor
    • The condition blocks inside the code verify the value and display the appropriate message
Code for the project

Conclusions

It has been a fun experience learning how to create an Alcohol tester. I believe that this device can be later used if needed. My knowledge regarding the Arduino technology has definitely improved.

Journal

01.05.2023 - Initial Documentation 03.05.2023 - Ordered the needed parts 10.05.2023 - Started testing the sensor 28.05.2023 - Finished the project

Resources

pm/prj2023/avaduva/random.1685401816.txt.gz · Last modified: 2023/05/30 02:10 by teodor.ionascu1507
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0