Last time on this blog, I made an ATTINY85 flash an LED
This time I made it turn on two different LED’s with a simple push of a button! (Warning; video has pulsing LED’s)
[VIDEO ID: a breadboard with a PDIP8 ATTINY85 microcontroller on it. There is a button next to it, and two LED'S connecting away from it; A yellow and a green. When the video starts, the yellow turns on, but every time a white human finger pushes and holds the switch, the yellow turns off and the green turns on. END ID]
This program will turn one LED on, but if you push the button it will turn it off and activate the other LED. The LED’s will alternate who’s on and off, and this is directly controlled by the tact switch
This one took a bit to code because I forgot how computers count!! And I knew better too!! I had all the bytes coded for 1,2,3,4 counting when computers count as 0,1,2,3. Very embarrassing 😔 Alas, here’s the assembly code I made for it :)
My next step is to make it count two pulses based on a toggled input. While one switch is pushed, count the other switch to see how many pushes it has before the first switch is released. Then, once it gets the count, flash an LED the same number of times.














