Link to demo :
https://drive.google.com/drive/folders/1VTiRrGRrAj3aiTELux77pBYvCo3-3btS?usp=drive_link
For this week’s unusual switch assignment, I wanted to create something active and game-like — something that felt more like play than a standard circuit. That’s how I ended up designing a target switch using a cardboard folder, aluminum foil, and a ball. Instead of pressing a button or stepping on a pedal, the switch is triggered when I successfully throw a ball at the target. The core of my design is a DIY target made by slightly opening a cardboard folder and placing aluminum foil inside each flap. These foil strips are wired to the Arduino, and act as the two sides of a switch. When the ball hits the folder, it causes the foil pieces to touch momentarily — closing the circuit and turning on an LED.
const int SwitchPin = 3; const int LEDPin = 12; void setup() { pinMode(SwitchPin, INPUT_PULLUP); pinMode(LEDPin, OUTPUT); } void loop() { const int Input = digitalRead(SwitchPin); if (Input == LOW) { digitalWrite(LEDPin, HIGH); // LED ON when ball hits target } else { digitalWrite(LEDPin, LOW); // LED OFF otherwise } }
The biggest challenge was making sure the foil only touches when I want it to — in this case, only when the ball hits the folder. I had to tape the foil securely and position it so that the folder remained slightly open. If it’s too loose, the foil touches on its own; too tight, and the impact doesn’t close the circuit. This project gave me a better understanding of how a simple digital input can be adapted into a physical interaction, using only basic materials like cardboard and foil. I also gained more confidence working with pull-up resistors and reading pin states accurately.