Project tutorial
Smart Dice of Ludo

Smart Dice of Ludo

This is smart dice of Ludo using Arduino Uno.

  • 9 views
  • 0 comments
  • 1 respect

Components and supplies

Necessary tools and machines

Tape

Apps and online services

About this project

Smart Ludo Dice

In this project I will show you how to make a smart Ludo dice at home.

In this project you will need the components like Arduino Uno, breadboard, 7-segment display (common anode), 330 ohm resistor, jumper wires, and 2 push switches.

Steps:

1. Take Arduino Uno, place 7-segment display and 2 push button on Breadboard.

2. Connect 330 ohm resistor with 7-segment common pin.

3. 1st push button is for reset the counter and 2nd push button for counting.

4. Do connections as shown in the circuit diagram.

5. Upload the code.

Enjoy the game....

Play with your friends!

Components required..

Place 7-segment display and both switch on breadboard.

Place jumper wires and 330 ohm resistor.

Upload the code and test it.

Enjoy the game...

Code

CodeArduino
#define resett 15
#define dice 14
char digit[6]={0x02, 0x79, 0x24, 0x30, 0x19, 0x12};
int pin[7]={9,8,7,6,5,4,3};
void setup()
{
  for(int i=0;i<7;i++)
  pinMode(pin[i], OUTPUT);
  pinMode(dice, INPUT);
  pinMode(resett, INPUT);
  digitalWrite(dice, HIGH);
  digitalWrite(resett, HIGH);
   int temp=0x40;
    for(int i=0;i<7;i++)
    {
      int temp1=temp&0x01;
      digitalWrite(pin[i], temp1);
      temp=temp>>1;
    }
    delay(1000);
}
void loop()
{
  int temp=rand();
  if(digitalRead(dice)==0)
  {
    int k=temp%6;
    temp=digit[k];
    wait();
    for(int i=0;i<7;i++)
    {
      int temp1=temp&0x01;
      digitalWrite(pin[i], temp1);
      temp=temp>>1;
    }
    delay(200);
  }
  if(digitalRead(resett)==0)

  {
    temp=0x40;
    for(int i=0;i<7;i++)
    {
      int temp1=temp&0x01;
      digitalWrite(pin[i], temp1);
      temp=temp>>1;
    }
  }
}

void wait()

{
  for(int m=0;m<10;m++)
  {
   for(int k=0;k<6;k++)
   {
    int ch=digit[k];
    for(int l=0;l<7;l++)
    {
      char tem2=ch&0x01;
      digitalWrite(pin[l], tem2);
      ch=ch>>1;
    }
    delay(50);
   }
  } 
}

Schematics

Circuit Diagram
150176116667243324359830e8e0a7fc r8tfpulptv

Comments

Similar projects you might like

LED Dice

Project showcase by Team ONYX

  • 6,942 views
  • 1 comment
  • 15 respects

Smart Home - Smart Rules using ARTIK Cloud & Photon

Project tutorial by Raghavendra Ponuganti

  • 3,801 views
  • 2 comments
  • 12 respects

Settlers Of Catan Dice

Project tutorial by joshi

  • 5,367 views
  • 13 comments
  • 27 respects

Arduino Digital Dice

Project tutorial by xXarduino_11Xx

  • 730 views
  • 5 comments
  • 8 respects

RF BASED SMART HOME AUTOMATION SYSTEM

by Dennis Mwanza

  • 28,291 views
  • 4 comments
  • 45 respects

Smart Blinds

Project tutorial by Froz3nArcher

  • 13,734 views
  • 3 comments
  • 47 respects
Add projectSign up / Login