Progress:

  • More stable stands/base
  • Slotted frames to ease rotation
  • Finger joints for cleaner assembly
  • Laser cut out of plywood (mix of 6mm and 1/8″)
  • Bearings at pivots

Our playfield has cutouts designed for the rollover switches and actuated walls, but we could not securely mount the lever switches beneath the playfield with the materials we had at home. The original plan was to finish laser cutting in the makerspace, but unfortunately it closed before we were able to do so.

#include <Servo.h&gt;

const int outerServoPin = 5;
const int innerServoPin  = 4;
//const int smallWallPin = 8;
//const int bigWallPin = 9;

const int jsXPin = A0;
const int jsYPin = A1;

//const int smallSwitchPin = 0;
//const int bigSwitchPin = 1;
//int smallPress = 0;
//int bigPress = 0;

Servo outerServo;
Servo innerServo;
//Servo smallWallServo;
//Servo bigWallServo;

int outerRotStart = 90;
int innerRotStart = 90;
int bigWallStart = 0;
int smallWallStart = 0;

int outerRotMin = outerRotStart - 60;
int outerRotMax = outerRotStart + 60;
int innerRotMin = innerRotStart - 60;
int innerRotMax = innerRotStart + 60;

int xPos;
int yPos;
int outerPos;
int innerPos;

void setup() {
  // put your setup code here, to run once:
  pinMode(jsXPin, INPUT);
  pinMode(jsYPin, INPUT);
  Serial.begin(115200);

  outerServo.attach(outerServoPin);
  innerServo.attach(innerServoPin);
  
  outerServo.write(outerRotStart);
  innerServo.write(innerRotStart);
  delay(1000);
}

void loop() {
  // put your main code here, to run repeatedly:
  xPos = analogRead(jsXPin);
  yPos = analogRead(jsYPin);

  outerPos = map(xPos, 0, 1023, outerRotMax, outerRotMin);
  innerPos = map(yPos, 0, 1023, innerRotMax, innerRotMin);

  outerServo.write(outerPos);
  innerServo.write(innerPos);
}