Arduino Project Hub
Project tutorial

The Magic Display With Arduino - The Mind Reader © CC BY-NC-ND

The Magic Display With Arduino can figure out with a few clues what is your choose on a card with 64 options of numbers, letters or symbols.

  • 1,423 views
  • 2 comments
  • 6 respects

Components and supplies

Apps and online services

About this project

Hello, everyone!!

The Magic Display is my unique creation that can read your mind and can find out what was your choose on a display with 64 numbers, letters, symbols or whatever else you want.

You can create many different personal templates to use with Magic Display.

But what can Magic Display do?

It asks a few questions (6 in total) that you just need answer YES or NO according to LED array connected.

If you see the number you chose in ON LED group, your answer is YES (Green tactile switch).

If your number is not highlighted, your answer will be NO (Red tactile switch).

With just these clues, after six questions, the Magic Display can figure out what it was like by showing it on a flashing screen.

You can repeat for any other number of your choice and Magic Display will give you the correct answer all the time.

And what makes Magic Display special and unique is that you can repeat the same number you choose before and you will see that Y/N responses will be different, but the end result will always be right!

Let's do it!! It is very simple to be built and very interesting to play!

Can you imagine what is the logics behind the scenes ?

I invite you to play it and try to explain us !!

LAGSILVA

Illustrative Video using #17 as example

1) Material List

- 01 Arduino/Genuino Uno

- 01 LED Array (8x8) Module with MAX7219

- 01 Mini-Breadboard

- 02 Tactile Switches

- 01 Printed template for LED display (see attachments)

- Jumpers for connections

2) Assembly

- Follow the connections according to the electronic schematic diagram.

- Print the template, cut and put it over the LED Matrix.

- Upload the code into Arduino.

3) Libraries for Arduino

You need to install the following libraries into your Arduino IDE:

- LED Matrix with MAX72xx library.

- MsTimer2 library to read the tactile switch buttons.

Note: On attachments you have a copy of them for your download and installation in your compute.

Custom parts and enclosures

Templates for the Cards
Templates to be used over the LED Array
Library for LED Array with MAX72xx
Library for LED Array with MAX72xx
ledcontrol-1_0_4_9qJAUOqS4E.zip
Library of MsTimer2
Library of MsTimer2
mstimer2_msMX8Y8w17.zip

Schematics

Schematics in PDF
Schematics in PDF file for the assembly

Code

Code of Mind ReaderArduino
Code for Arduino IDE of Mind Reader
/*    The Mind Reader - The Magic Cards with Arduino
      Copyright by LAGSILVA
      V2.1 - 17.Apr.2017
*/

#include <LedControl.h>   // Library for LED Array with MAX72XX
#include <MsTimer2.h>     // Library for Timer2

int k, b, chv, cartela, numcol, numlin, res, lin;
int botoes = 0;

byte simPinSW = 8; //Tactile button for the answer YES
byte naoPinSW = 7; //Tactile button for the answer NO
byte botaoSim, botaoNao;

/*
  Pin numbers of Arduino for connection with MAX72XX module
  pin 7 is connected to the DataIn (DIN)
  pin 6 is connected to LOAD (CS)
  pin 5 is connected to the CLK (CLK)
*/

LedControl lc = LedControl(2, 4, 3, 1);

//Array of digits numbers - 0 to 9 - Size 5x3
byte num[10][5] = {
  {7, 5, 5, 5, 7},  //0
  {2, 6, 2, 2, 2},  //1
  {7, 1, 7, 4, 7},  //2
  {7, 1, 7, 1, 7},  //3
  {5, 5, 7, 1, 1},  //4
  {7, 4, 7, 1, 7},  //5
  {7, 4, 7, 5, 7},  //6
  {7, 1, 2, 2, 2},  //7
  {7, 5, 7, 5, 7},  //8
  {7, 5, 7, 1, 7},  //9
};


void setup() {

  pinMode (simPinSW, INPUT_PULLUP);
  pinMode (naoPinSW, INPUT_PULLUP);

  MsTimer2::set(10, lerBotoes); // 10ms period
  MsTimer2::start();

  lc.shutdown(0, false);    // Wakeup call of MAX72XX
  lc.setIntensity(0, 10);    // Set the bright of display (max is 15)
  lc.clearDisplay(0);       // Clear the display

}


void loop() {
  
  randomSeed(analogRead(0));
  chv = random(1, 64);
  res = 0;
  for (cartela = 1; cartela <= 6; cartela++) { // Print the 06 questions
    lc.clearDisplay(0);
    delay(1000);
    for (lin = 0; lin < 5; lin++) { //Print the number of current question
      byte temp = num[cartela][lin];
      temp = temp << 2;
      lc.setRow(0, lin + 1, temp);
    }
    delay(1000);
    lc.clearDisplay(0);
    for (k = 1; k <= 64; k++) {
      b = k ^ chv;
      if (b >> (cartela - 1) & 1) {
        numcol = (k - 1) % 8;
        numlin = (k - 1) / 8;
        lc.setLed(0, numlin, numcol, true);
      }
    }
    while (botaoSim == 1 && botaoNao == 1) {
      delay(100);
      if (botaoSim == 0) {
        bitSet(res, cartela - 1); 
      }
    }
  }
  res = res ^ chv; 
  if (res == 0) {
    res = 64;
  }
  lc.clearDisplay(0);
  delay(1000);
  numcol = (res - 1) % 8;
  numlin = (res - 1) / 8;
  while (botaoSim == 1) { //Press YES to play again
    lc.setLed(0, numlin, numcol, true);
    delay(400); //Blinking LED for the result
    lc.setLed(0, numlin, numcol, false);
    delay(200);
  }
  
}


void lerBotoes() {  //Read YES or NO buttons

  botaoNao = digitalRead(naoPinSW);
  botaoSim = digitalRead(simPinSW);
  
}

Comments

Similar projects you might like

3D-Printed Prank Vibrating Cup

Project tutorial by Alex Wulff

  • 1,164 views
  • 2 comments
  • 13 respects

Very First Hands On Arduino - Voice Activated LED

Project tutorial by Liren Yeo

  • 615 views
  • 1 comment
  • 8 respects

Get Connected! WiFi Registration Using AP Mode!

Project tutorial by Brian Carbonette

  • 1,305 views
  • 0 comments
  • 16 respects

The Soldering Iron Controller for Hakko T12 Tips

Project tutorial by Alexander

  • 8,467 views
  • 4 comments
  • 26 respects

Voltmeter Using Arduino

by Team Next Tech Lab

  • 3,025 views
  • 8 comments
  • 44 respects

Prank Your Friends with Talking Darth Vader

Project tutorial by Chathuranga Liyanage

  • 272 views
  • 0 comments
  • 2 respects
Add projectSign up / Login