Rohan Barnwal
Published

SmartPhone Controlled Led Matrix

Hi, My name is Rohan Barnwal and in this project, I have taught you how to control led matrix with your smartphone.

BeginnerProtip4,435
SmartPhone Controlled Led Matrix

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
LED Dot Matrix Display, Red
LED Dot Matrix Display, Red
×1
MAX7219/MAX7221 LED Display Drivers
Maxim Integrated MAX7219/MAX7221 LED Display Drivers
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Connection

Code

Code

Arduino
#include <LedControl.h>

int DIN = 12;
int CS = 10;
int CLK =  11;


int row=0;
int col=0;
int temp=0;
int data=0;

LedControl lc=LedControl(DIN,CLK,CS,1);

void setup()
{
 lc.shutdown(0,false);       
 lc.setIntensity(0,5);
 lc.clearDisplay(0);
 Serial.begin(9600);
}




void loop()
{ 
   if(Serial.available() > 0)      
   {
      data = Serial.read();// it returns ascii value if we send one in the phone                
      if(data < 96)
      {
       if(temp==0)
       {
        row=data-48;
        temp=1;
       }
       else
       col=data-48;
      }
    
       else if(data=='n')
       {
         lc.setLed(0,row,col,true);
        Serial.println('n');
       Serial.println(row);
       Serial.println(col);
         temp=0;
       }
       else if(data=='f')
       {
         lc.setLed(0,row,col,false);
         Serial.println('f');
         Serial.println(row);
         Serial.println(col);
         temp=0;
       }

       else if(data=='r')
       lc.clearDisplay(0);
    }

    
}

Credits

Rohan Barnwal

Rohan Barnwal

19 projects • 28 followers
Rohan Barnwal - maker, hacker, tech enthusiast. I explore new tech & find innovative solutions. See my projects on hackster.io!

Comments