16 March 2026

Scaffolding: Progress Review - Team 6

 The Yolk Controller is a custom flight controller designed for Star Wars: Squadrons, built around the fantasy of piloting an X-Wing or TIE Fighter in the heat of space combat. The controller takes the form of a yoke, the kind of dual-grip flight stick found in real aircraft cockpits, drawing a direct visual line between the player's hands and the experience of being a starfighter pilot in the Star Wars universe. Every input on the controller maps intentionally to the game's systems. Two potentiometers manage the ship's energy distribution across speed, laser power, and shields, mirroring the in-game resource triangle that skilled pilots constantly balance. A toggle switch physically flips shield coverage between the front and rear of the ship. The bumpers and triggers handle targeting, primary laser fire, secondary rocket fire, and system repair. Finally, the Circuit Playground Express reads the controller's real-world motion: rotating it steers the ship, pushing it forward increases thrust, and tilting it up or down moves the ship along the vertical axis. Every gesture feels like flying.

Controller Sketch:

psudocode:

//Final Group 6
//Marc Walker, Nicholas Smith

#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>

//declare variables for analog read values

void setup() {
  // start CircuitPlayground and Serial Monitor
  CircuitPlayground.begin();
  Serial.begin(9600);
  delay(1000);
}
void loop()
{
  float rPot;//Right Potentiometer
  float lPot;//Left Potentiometer
  int shields;//Read value of shields mapped between 0 and 100
  int speed;//Read value of speed mapped between 0 and 100
  int laserStrength;//Read value of laserStrength mapped between 0 and 100
  float vertical;
  float horizontal;
  vertical = Get CPE accelerometer Y value;
  horizontal = Get CPE accelerometer X value;
  shields = lPot;
  speed = rPot;
  laserStrength = (shields + laserStrength) / 2;
  bool LButton = true if Left button is pressed;
  bool RButton = true if Right button is pressed;
  bool LSwitch = true if Left switch is flipped;
  bool RSwitch = true if Left switch is flipped;
  if Positive value of vertical value greater than 0
  {
    Press W Key
  }
  if Negative value of horizontal value less than 0
  {
    Press A Key
  }
  if Negative value of vertical value less than 0
  {
    Press S Key
  }
  if Positive value of horizontal value greater than 0
  {
    Press D Key
  }
  if(LButton)
  {
    Fire Lasers
  }   if(RButton)
{ fire secondary weapons }
  if(LSwitch)
  {
    Shields enabled in front
  }
  else
  {
    Shields enabled in back
  }
  if(RSwitch)
  {
    Sublight enabled
  }
  else
  {
    Sublight disabled
  }
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.