Do you have one of those $1 LED flashlights?
My standard flashlight ran on a triple A battery trio in series circuit, so around 4.5V. I compared my $1 flashlight to others more expensive versions and saw it's weakness. On and Off. That's all it could do. Though that's great for some uses, I wanted an upgrade. I took the little flashlight apart and removed the LED head. See the terminals were exposed nicely, I melted power and ground wires to it. Connecting it to a 5V power bank, I was so happy to see the extra 0.5V brighten to LED head without burning them out.
Second, I wrote a code and added three different light modes and a rapid strobe. By pressing the button you can cycle between them. I love looking at a random object and thinking of what code is running behind it. This was a fun, quick project.
The circuit includes a single LED to act as the LED head for the diagram. The 5V from the transistor will blow the LED if a 220 Ohm resistor is not placed between the LED and ground. I am using the 2N 2222A transistor.
I hope you have a wonderful day! Enjoy the flashlight!