Last active
September 4, 2015 22:55
-
-
Save mrizvic/20d3d545685dcd4dc046 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
byte muxCount = 0; | |
byte mask[16]={113,114,116,120,177,178,180,184,209,210,212,216,225,226,228,232}; | |
byte ledSegments1[]={0,0,1,1,0,1,0,1,0,1,0,1,1,0,0,1}; | |
void displayRing(byte input[]) { | |
if (input[muxCount]) { PORTD = mask[muxCount]; } else { PORTD = 0; } | |
muxCount = ++muxCount % 16; | |
} | |
void setup() { | |
DDRD = B11111111; // sets Arduino pins 0 to 7 as outputs | |
} | |
void loop() { | |
displayRing(ledSegments1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment