Arnov Sharma
Published © GPL3+

Goku PCB Badge V2

Made a PCB badge of our beloved hero Goku, LEDs sequence will look like Kamehameha in this badge.

BeginnerFull instructions provided2 hours360

Things used in this project

Hardware components

Microchip attiny13A
×1
PCBWay Custom PCB
PCBWay Custom PCB
×1
Arduino Nano R3
Arduino Nano R3
×1

Story

Read more

Schematics

sch

Code

code

C/C++
int pinsCount=5;            // declaring the integer variable pinsCount
int pins[] = {0,1,2,3,4};     // declaring the array pins[]
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
}
void loop() {
for (int i=0; i<pinsCount; i=i+1){  // chasing right
digitalWrite(pins[i], HIGH);     // switching the LED at index i on
delay(70);             // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW);     // switching the LED at index i off
}
for (int i=pinsCount-1; i>0; i=i-1){  // chasing left (except the outer leds)
digitalWrite(pins[i], HIGH);     // switching the LED at index i on
delay(70);             // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW);     // switching the LED at index i off
}
}

Credits

Arnov Sharma

Arnov Sharma

308 projects • 306 followers
Just your average MAKER

Comments