Useless machine, a device with a function but no direct purpose, started by the italian artist Bruno Munari in the 1930s.
This version was mounted over an old Cigar box with Arduino Nano, a strong Mg996 servo motor, a 3d printed arm, DFPlayer mini, microSD, 4ohm 3 watts Speaker, a resistor and a switch.
Art, philosophical point, sad metaphor, simple joke. All valid options.Code
There is not much code to explain. Just switch detection, servo movement and mp3 playback.
int butValue = digitalRead(switchPin);
Serial.println("Machine is on");
// Play mp3
// first time playback
// pause mp3