Вы находитесь на странице: 1из 3

Random Number Generator

Using Arduino Uno


Ainna Nadirah Binti Zubidi, Alia Yasmin Binti Nor Saidi ans Khairunnisa Binti Mahamad Anizam
Universiti Kuala Lumpur British Malaysian Institute (UniKL BMI)

Abstract— Random Number Generator: This circuit helps to B. Circuit Diagram


generate a random number in between 0 to 100 when push
button is pressed and it may be used in the games like monopoly,
snake ladder.

Keywords— Random Number; Arduino Uno and LCD

I. INTRODUCTION

Arduino is an open source computer hardware and


software company, project, and user community that designs
and manufactures single-board microcontrollers
and microcontroller kits for building digital devices and
interactive objects that can sense and control objects in the
physical and digital world. The project's products are
distributed as open-source hardware and software, which are
licensed under the GNU Lesser General Public
License (LGPL) or the GNU General Public License (GPL),
permitting the manufacture of Arduino boards and software
distribution by anyone. Arduino boards are available
commercially in preassembled form, or as do-it-
yourself (DIY) kits.

Arduino board designs use a variety of


microprocessors and controllers. The boards are equipped with
sets of digital and analog input/output (I/O) pins that may be
interfaced to various expansion boards
or Breadboards (shields) and other circuits. The boards feature
serial communications interfaces, including Universal Serial
Bus (USB) on some models, which are also used for loading
programs from personal computers. The microcontrollers are
typically programmed using a dialect of features from the
programming languages C and C++. In addition to using
traditional compiler toolchains, the Arduino project provides
an integrated development environment (IDE) based on
the Processing language project.

II. OJECTIVE
 To generates any random number as a dice.
 To interface LCD display to Arduino Uno.

III. DATA ANALYSIS

A. Price of Component
Total
Price per
Component Unit price
unit (RM)
(RM)
ARDUINO UNO 1 40.00 40.00
LCD display
1 20.00 20.00
Alphanumeric 2 x 16
USB AM to USB BM
1 10.00 10.00
cable
USB AM to DC Plug 1 8.00 8.00
Push button 2 0.40 0.80
TOTAL 78.80
C. Flowchart D. Coding of Project

IV. DISCUSSION
The problem statement that required us to generates a
random number in between 2 to 12 when the pushbutton is
pressed, and it may be used in the games like a dice.

Before the LCD displays the digits from 2 -12


randomly, the LCD first will be checked whether all the pins
are working or not. This is to avoid any failure in displaying
the digits. If one of the pins is not working, the system will not
continue to operate.

In this project, we use common LCD to display the


digits. For this circuit pins 1 to 16 are connected to the
Arduino Uno while the Vss, V0 and Rw is connected to the
ground. Then, Vcc pin is connected to the +5v, Rs pin to the Pin
0, E to the Pin 1. Next, D4, D5, D6 and D7 is connected to the
Pin 8, Pin 9, Pin 10 and Pin 11 respectively.

This system basically operates with simple


procedure. After the program (software) is burn to the
microcontroller, we connected the circuit. Then, we can
observe that digits are displayed randomly with some delay
after we push the push button. Basically, the input for this
project is the push button.
V. CONCLUSION
In conclusion, the objective for this project is achieved. The
LCD start to display any random number as a dice when the
push button is push. Arduino UNO is used in this circuit.

Вам также может понравиться