This project was created for a hackathon I participated in this weekend, but the hardware judging was removed so I thought the best place to put this is on here. Those software types didn't understand what I was doing anyway, to be fair.

So now to get into what the hell these ICs are doing. I break this project down into two parts: the life counter, and laser.

The life counter works by using a 40192B that I found in my university's lab, which is a up/down counter to BCD. Luckily I had some 74HCT4511's lying around my room, which is a CMOS/TTL compatible BCD to 7-segment display ic. Then the output of the '4511 went to some inverters and then the 7 segment display I had, to display correctly as I appear to have purchased the wrong 7 segments in the past. To then check when the input reaches 0/to prevent underflow errors, I NOR'd the BCD output and then NAND'd the output of the NORs. This is then AND'd with the output of the 412 opamp I used as a comparitor. Backing up a bit, a LDR was used with a 22K resistor as a voltage divider on the non-inverting input of the opamp, and a 10k and 22k resistor for the inverting input. So, when the opamp is triggered, the high output of the control logic then goes to the down-clock of the 40192B causing the life counter to decrease, but never below 0. In addition to issues with unknown states when powering on, there is a preset button that makes the output of the 40192B start at 9.

The laser is almost too simplistic, with the main functionality coming from a RC circuit. A push button dumps the output of the RC circuit to the base of a 2N4401, which then drives the laser diode. While I didn't have too many capacitors to play around with, using a 220uF and 10K resistor gave a decent amount of delay, so there would have to be a wait for at least a couple seconds before hitting the button again.