Project#1: Led Matrix

The first idea of my project.

This week i used Arduino in order to start with my project.

The first idea of my project is use a matrix of led as a screen and put on top of it 4 pressure sensors.

According to which sensor is touched the Leds in the matrix switch on.

Here a schema a simple schema of this first idea.

IMG_20160223_164350

I choose this Project because i want to built something tangible with basic components of Arduino.

What I used

  • Arduino UNO
  • 16 x LED (Light Emitting Diode)
  • 4 x 220 Ohm resistor

I even used a whiteboard for link the circuit with the Pin of Arduino.

Building the Led Matrix

I started to develop my project by building the Led’s Matrix.

I did some research in internet an I found a interesting tutorial in this web site.

So I started by following this schema.

FIG8

 

FIG11

At first view the circuit appear really simple, but after i while, when I started to building it wasn’t simple as I thought.

IMG_20160121_164036 IMG_20160121_164432

IMG_20160121_175216IMG_20160121_175206

Code

I used the code that was in the tutorial. The code follow this 8 step:

1) Clear array – set all pins to 0 (all LEDs OFF in the array) using clearArray() function
2) Set the needed LEDs for animation 1st frame to ON (1) in the 2D array
3) Draw matrix (turn on the actual LEDs from the array – drawMatrix() function)
4) Repeat step 3) for many times, let’s say 1000 as drawMatrix() will only turn on LEDs for a small fraction of time, but we need for them to be on for longer time

5) Clear array – set all pins to 0 (all LEDs OFF in the array) using clearArray() function
6) Set the needed LEDs for animation 2nd frame to ON (1) in the 2D array
7) Draw matrix (turn on the actual LEDs from the array – drawMatrix() function)
8) Repeat step 7) for many times, let’s say 1000 as drawMatrix() will only turn on LEDs for a small fraction of time, but we need for them to be on for longer time

Conclusion

At the end unfortunately the Matrix of led was not working properly, probably because I made some mistake when i plugged the Leds in the board. You must be very careful with the anodes and cathodes !

IMG_20160121_194220

 

 

Publicités
Publié dans Uncategorized
Web2PDF