Wanted to get this ball started before I consider it too much work. This is the lighting for one of the two SC-HPA Nerf Guns. It’s super simple, all of the lights are run off of a single PWM pin. You flip on the safety switch at the bottom and there you go, pretty pulsing lights.
Here is the code, really its super short: int led = 9; int brightness = 0; int fadeAmount = 5; void setup() { Â pinMode(led, OUTPUT); } void loop() { Â analogWrite(led, brightness); Â brightness = brightness + fadeAmount; Â if (brightness == 0 || brightness == 255) { Â fadeAmount = -fadeAmount; Â } Â delay(30); }
It runs off of an Arduino Nano (off-brand clone) with a 9v battery for power. And that’s it.















