Skip to content

Commit

Permalink
Merge pull request #124 from sol-oyarce/main
Browse files Browse the repository at this point in the history
agregar apuntes sol-oyarce
  • Loading branch information
montoyamoraga authored Sep 10, 2024
2 parents ea8ff22 + 98320d2 commit 0b2921b
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions 12-sol-oyarce/clase-05/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,33 +123,35 @@ long smooth() { /* function smooth */

## CODIGO UTILIZADO

#include "Arduino_LED_Matrix.h" //Include the LED_Matrix library
#include "animation.h" //Include animation.h header file

// Create an instance of the ArduinoLEDMatrix class
ArduinoLEDMatrix matrix;
#include "Arduino_LED_Matrix.h" //Include the LED_Matrix library
#include "animation.h" //Include animation.h header file

void setup() {
pinMode(2, INPUT);
pinMode(3, OUTPUT);
matrix.loadSequence(animation);
// Create an instance of the ArduinoLEDMatrix class
ArduinoLEDMatrix matrix;

void setup() {

pinMode(2, INPUT);
pinMode(3, OUTPUT);
matrix.loadSequence(animation);
matrix.begin();
matrix.play(true);
}
}

void loop() {
if (digitalRead(2) == HIGH) {
void loop() {
if (digitalRead(2) == HIGH) {
digitalWrite(3, HIGH);
matrix.loadSequence(animation);
matrix.play(true);
delay(10000);
}
else {
}
else {
digitalWrite(3, LOW);
matrix.play(false);
delay(1000);
}
}
}
}



Expand Down

0 comments on commit 0b2921b

Please sign in to comment.