Drumbot
Drumbot is an Arduino Uno controlled servo with arm that bangs on some surface like an empty cardboard box to simulate drum machine or metronome.
How to Build a Drumbot
The drumbot or drum machine or metronome is simply a microservo arm that bangs on some surface and is controlled by an Arduino Uno and two 10k potentiometers that control the servo arm angle and speed.
The program I used was first programmed online in Wokwi and includes a working ciruit with wiring diagram. Link to my software and wiring circuit is here: https://wokwi.com/projects/381508100050892801
The software can be easily modified to provide more of a rhythm with stronger downbeats on different beats in a measure but I left it in metronome mode so that it can be used with any time signature.
I added a round pencil erasure to the drum stick to provide a heavier beat on the drum surface. It even allows the drumstick to bounce if you want it to.