Hackaday article jumbo-leds-make-for-a-handy-attiny-beacon/
Based on Kingbright Jumbo LED DLC-6SRD
In this monster led is 6 leds, why power all together? individual control is more fun
Controlled with charlieplexing with 3GPIO from AtTiny10
TO DO:
- try another colors .... blue, green ... green/ red (3x red 3x green)
- more power save code, with sleep
Source is simple ...
#include <avr/io.h>
#include <stdint.h>
int main (void) {
DDRB = 0b0111; // Equivalent to pinMode
while (1)
{
led (1,2);
led (4,1);
led (2,1);
led (2,4);
led (4,2);
led (1,4);
}
}
void led (char plus, char minus)
{
DDRB = 0b0111; // all input;
DDRB = plus | minus;
PORTB = plus;
PORTB = minus;
delay (100);
}
void delay (int millis) {
for (volatile unsigned int i = 34*millis; i>0; i--);
}
Do I see a footprint for a button?
Never seen those leds. The look like fun. Looking at the video it looked like you were using some sort of PWM, as the motions was quite fluid. Seeing the code, it seems I was mistaken.