Wheel of Fortune

https://youtu.be/K1Ia0j596d0
This thing is not for beginners.
Push the button and the wheel rotates to a random position. The valve opens and if you are lucky, M&M's come out.
The circuit is for a 5V stepper motor max 1 Amp.

An Arduino sketch in its basic form:
The include servo.h line has to be adapted, since Thingiverse makes a mess of this Arduino line.

//Wheel of Fortune

include

Servo myservo;
int pos = 0;
int L1 = 0; //stuurdraden Links
int L2 = 1;
int L3 = 2; //stuurdraden Rechts
int L4 = 3;
int trigger = 0;
int d=5; //delay
int tr = 0;
int r = 0;
int x = 0;
void setup()
{
myservo.attach(11);

pinMode(L1, OUTPUT); pinMode(L2, OUTPUT);
pinMode(L3, OUTPUT); pinMode(L4, OUTPUT);
pinMode(trigger, INPUT);
}
void loop(){
tr = analogRead(trigger);
if(tr<400){
r = random(10,100);
for(int y = 0; y<r; y++){
for(int x = 0; x<5; x++){
digitalWrite(L1, HIGH); digitalWrite(L2, LOW); digitalWrite(L3, HIGH); digitalWrite(L4, LOW); delay(d);
digitalWrite(L1, LOW); digitalWrite(L2, HIGH); digitalWrite(L3, HIGH); digitalWrite(L4, LOW); delay(d);
digitalWrite(L1, LOW); digitalWrite(L2, HIGH); digitalWrite(L3, LOW); digitalWrite(L4, HIGH); delay(d);
digitalWrite(L1, HIGH); digitalWrite(L2, LOW); digitalWrite(L3, LOW); digitalWrite(L4, HIGH); delay(d);}}

digitalWrite(L1, LOW); digitalWrite(L2, LOW); digitalWrite(L3, LOW); digitalWrite(L4, LOW);
delay(2000);
for (pos = 0; pos <= 180; pos += 1) { myservo.write(pos); delay(15); }
delay(2000);
for (pos = 180; pos >= 0; pos -= 1) { myservo.write(pos); delay(15); }
}
}