Created
November 9, 2019 00:15
-
-
Save javaplus/dfc15d7f33f058820654cba4e3fe2191 to your computer and use it in GitHub Desktop.
Simple countdown for Arduino using 7 segment display with HT16K33 backpack
This file contains hidden or 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
#include <Wire.h> // Enable this line if using Arduino Uno, Mega, etc. | |
#include <Adafruit_GFX.h> | |
#include "Adafruit_LEDBackpack.h" | |
Adafruit_7segment matrix = Adafruit_7segment(); | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
Serial.println("7 Segment Backpack Test"); | |
matrix.begin(0x70); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
boolean drawDots = true; | |
for (int counter = 10; counter >=0; counter--) { | |
matrix.drawColon(drawDots); | |
matrix.writeDisplay(); | |
delay(10); | |
matrix.print(counter); | |
matrix.writeDisplay(); | |
delay(500); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment