Last active
January 22, 2016 18:51
-
-
Save eloisaromero/be5e09d5f77a1c545144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ejemplo de mensaje en display TM1637 con Arduino iluminando cada segmento de cada dígito | |
* Copyright 2016 - Fábrica Digital (fabricadigital.org) | |
* | |
* Publicado bajo licencia CC-BY-SA 4.0 | |
* Creative Commons: Reconocimiento - Compartir Igual 4.0 Internacional | |
* http://creativecommons.org/licenses/by-sa/4.0/deed.es_ES | |
* | |
* Modificado el 15 de enero de 2016 | |
* por Eloísa Romero para Fábrica Digital | |
*/ | |
#include <TM1637Display.h> // librería TM1637 | |
const int CLK = 2; // el pin CLK está conectado al pin digital 3 | |
const int DIO = 3; // el pin DIO está conectado al pin digital 2 | |
TM1637Display display(CLK, DIO); //instanciamos el TM1637, creando un objeto | |
byte HOLA[] = { | |
0b01110110, // H | |
0b00111111, // 0 | |
0b00111000, // L | |
0b01110111 // A | |
}; | |
void setup() { | |
display.setBrightness(0x0f); // brillo | |
} | |
void loop() { | |
display.setSegments(HOLA); // muestra la variable byte HOLA | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment