Creatjet3D-Labsmunazirali4793
Published © GPL3+

Joystick controlled Led Matrix using Arduino

In this project we are going to show you, how to works joystick and output taking on 8*8 Led Matrix.

IntermediateFull instructions provided6,465
Joystick controlled Led Matrix using Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Analog joystick (Generic)
×1
9V battery (generic)
9V battery (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Code

Joystick controlled Led Matrix using Arduino.

C/C++
In this project we are going to show you, how to works joystick and output taking on 8*8 Led Matrix.
#include "LedControl.h"
#define joyX A0
#define joyY A1
 
int xMap, yMap, xValue, yValue;
LedControl lc=LedControl(12,11,10,1);
 
void setup() {
  Serial.begin(115200);
 
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}
 
void loop() {
  // put your main code here, to run repeatedly:
  xValue = analogRead(joyX);
  yValue = analogRead(joyY);
  xMap = map(xValue, 0,1023, 0, 7);
  yMap = map(yValue,0,1023,7,0);
  lc.setLed(0,xMap,yMap,true);
  lc.clearDisplay(0);
 
}

Credits

Creatjet3D-Labs
7 projects • 23 followers
munazirali4793
8 projects • 20 followers

Comments