top of page
fondo ej-15.png

CHALLENGE 1 - introductory course

Install programming software

15 min 

STEP 1

Press the button to go to the Arduino page. Follow the download instructions depending on your operating system (Windows, Mac or Linux).

Captura de pantalla 2024-09-30 a la(s) 12.24.04.png

STEP 5

Download the file and upload it to Mblock.

You can use the same file as in the previous exercise.

Captura de pantalla 2024-09-30 a la(s) 12.28.18.png

STEP 8

I defined the chosen digital PIN.

This PIN is the one we use to connect the LED Matrix to the Arduino.

Captura de pantalla 2024-09-30 a la(s) 12.35.34.png

STEP 8

I defined the chosen digital PIN.

This PIN is the one we use to connect the LED Matrix to the Arduino.

Captura de pantalla 2024-10-14 a la(s) 12.20.03.png

STEP 8

I defined the chosen digital PIN.

This PIN is the one we use to connect the LED Matrix to the Arduino.

Captura de pantalla 2024-10-14 a la(s) 12.20.25.png

STEP 8

=> Show Cursor

=> Wait 0.1 seconds

The wait is necessary for it to react after 0.1 seconds; if we don't wait, when we press it, the cursor will shoot out at an exaggerated speed and we won't be able to control it.

Captura de pantalla 2024-10-14 a la(s) 12.22.11.png

STEP 8

=> Show Cursor

=> Wait 0.1 seconds

The wait is necessary for it to react after 0.1 seconds; if we don't wait, when we press it, the cursor will shoot out at an exaggerated speed and we won't be able to control it.

Captura de pantalla 2024-10-14 a la(s) 12.22.11.png

STEP 8

=> Show Cursor

=> Wait 0.1 seconds

The wait is necessary for it to react after 0.1 seconds; if we don't wait, when we press it, the cursor will shoot out at an exaggerated speed and we won't be able to control it.

Captura de pantalla 2024-10-22 a la(s) 15.58.30.png

STEP 8

I defined the chosen digital PIN.

This PIN is the one we use to connect the LED Matrix to the Arduino.

Captura de pantalla 2024-10-22 a la(s) 15.59.25.png

STEP 9

When we press the top button, which is connected to PIN 3, we increase the cursor variable by 8 units , since we want to “Go Up”.

For example, if we are on LED 2 and we press the button to raise the cursor, LED 10 will turn on, therefore our cursor variable must increase by 8 units.

Captura de pantalla 2024-10-22 a la(s) 15.59.33.png

STEP 10

We do the same with the rest of the buttons

B2: We want it to move to the right, so we subtract -1

B3: We want it to move down, what number should we put in?

B4: We want it to move to the left, what number should we put?

Captura de pantalla 2024-10-22 a la(s) 15.59.49.png

STEP 11

When we pass LED 63 the counter will continue counting, so we have to tell it that when it reaches LED 63 it will return to 0.

The counter variable is not limited by the number of LEDs, we limit it that way for our purpose.

Captura de pantalla 2024-10-22 a la(s) 15.59.59.png

STEP 12

We added a block that allows us to say if it is greater than 63 then...

Cursor>63

STEP 13

We set the Cursor to 0.

In this case we chose to return to zero when we pass LED 63.

Captura de pantalla 2024-10-14 a la(s) 11.48.37.png

STEP 14

When we are on Pixel 0 and we want to move to the right, we would be subtracting 1, moving to the -1 LED which does not exist, therefore in that case the cursor should remain on LED 0.

Captura de pantalla 2024-10-14 a la(s) 12.07.52.png

STEP 15

We place the delete block so that a drawing effect is not created, therefore we delete the previous one and immediately draw the new LED with the cursor value already updated.

Captura de pantalla 2024-10-14 a la(s) 12.08.10.png

STEP 7

Tell your Arduino which port it is connected to.

Tools/Port/*select_port*

 

You have to mention dev.Arduino Uno, dec/cu.usbserial or COM. If many appear, try until it lets us upload.

fondo rayas blancas-16.png

CHALLENGES

 1: You will be able to change the brightness of the LED Matrix to the maximum and turn it on with the color Red


2: It will manage to change the brightness of the LED Matrix to an intermediate level and turn it on with the color Green


Ex 3: Achieve the SECONDARY colors,
these are Yellow, Magenta and Cyan.

Secondary colors are formed by combining equal parts of the primaries. Do you dare to program them?
 

logo_Working table 1.png

Build and learn to program your own game console with your PIXO kit!

FAQ

GAMES

EXERCISES

CONTACT

+598 94 552 139

  • LinkedIn
  • Instagram
  • Youtube
bottom of page