Project showcase
Number Guessing System With Arduino

Number Guessing System With Arduino © GPL3+

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

  • 2,171 views
  • 0 comments
  • 4 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

About:

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

Pin Diagram.
Screen shot 2017 10 07 at 10 fr2cdo1tbd

Comments

Similar projects you might like

Android App-Based Home Automation System Using IOT

Project tutorial by Team Autoshack

  • 46,107 views
  • 22 comments
  • 132 respects

RFID Based Automatic Door System

Project showcase by Robodia Technology

  • 52,737 views
  • 24 comments
  • 133 respects

RF BASED SMART HOME AUTOMATION SYSTEM

by Dennis Mwanza

  • 34,689 views
  • 5 comments
  • 51 respects

Arduino-based Obstacle Monitoring System

Project showcase by Boaz Lawnce

  • 3,591 views
  • 0 comments
  • 4 respects

Home Monitoring System and Smart Home Solution

Project showcase by Akash Kumar

  • 9,313 views
  • 0 comments
  • 26 respects

Arduino Irrigation System

Project tutorial by smana_00

  • 6,893 views
  • 0 comments
  • 24 respects
Add projectSign up / Login