Project showcase

# Number Guessing System With Arduino © GPL3+

With this system, guess the number in between any range required according to the situation.

• 2,171 views
• 4 respects

## Components and supplies

 Arduino UNO & Genuino UNO
×1
×1
 Jumper wires (generic)
×1
 Adafruit Standard LCD - 16x2 White on Blue
×1

## Necessary tools and machines

 Soldering iron (generic)

## Apps and online services

 Arduino IDE

The “Number Guessing System” is quite simple. In this system guess the number in between any range as required according to the situation. This simple circuit is based on Arduino UNO and a breadboard. In this number guessing game circuit, we are utilising it in astable mode. And the output of the system is seen on 16x2 LCD Display.

### Description:

This system is programmed in such a way that it gives an output between 1 - 99. Otherwise if we change the output range of the system, it could be between 0 - 10000, where it shows the output in four digits, then we could use this system for pin/password guessing (i.e. a locker or bank account has 4 digit pin password).

This system program is stored in the Arduino and it is connected to a breadboard via jump wire so the 16x2 LCD display is connected to the Arduino via breadboard. Pin connections for the 16x2 LCD display are given below.

The program is designed in such a way that is gives an output in every five second and also clears the LCD display. Output from the system is assigned through pin 6 of the Arduino, which is connected the Vo pin of LCD display.

## Code

##### Number Guessing CodeC/C++
all the instructions are briefly mentioned in program with the help of comments.
```// include the liquidcrystal library code:
#include <LiquidCrystal.h>

// it extends the size of randNumber
long randNumber;

// defines the constant values
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {

}

void loop() {

// lcd first column code
// begin the lcd display
lcd.begin(16, 2);
// print below text
lcd.print("Number Guessing");
analogWrite(6,100);
// delay half second
delay(500);

// "lcd second column and first to forth code"
lcd.setCursor(0, 1);
// print below text
lcd.print("No : ");
analogWrite(6,100);
// agian delay of half second
delay(500);

// "random number ganerator code"

// set cursor
lcd.setCursor(5,1);
// get a number from random function
randNumber = random(0,10000);
// print random number on lcd
lcd.print(randNumber);
analogWrite(6,100);
// again delay 5 second
delay(5000);
// clear screen
lcd.clear();
delay(500);

}
```

## Schematics

• 1 project
• 0 followers

October 7, 2017

#### Members who respect this project

and 2 others

See similar projects
you might like

#### Android App-Based Home Automation System Using IOT

Project tutorial by Team Autoshack

• 46,107 views
• 132 respects

#### RFID Based Automatic Door System

Project showcase by Robodia Technology

• 52,737 views
• 133 respects

• 34,689 views
• 51 respects

#### Arduino-based Obstacle Monitoring System

Project showcase by Boaz Lawnce

• 3,591 views
• 4 respects

#### Home Monitoring System and Smart Home Solution

Project showcase by Akash Kumar

• 9,313 views