HOW DOES YOUR COMMAND CENTER WIRING WORK?  

Is your Command Center build complete? If so, you are in the right place! Grab your Command Center and let's take a closer look at the wiring. Let's first understand how the wiring of the joystick and the buttonpad work with the Arduino Micro that is the "brain" of the Command Center. To do that, we will use a "fancy schmancy digitizer" to look at the circuits.

Our fancy schmancy digitizer in this case is Tinkercad, a super powerful, free tool which lets you build Arduino circuits and simulate how the circuits will work when you write code.

Note: The mockup below is useful for understanding the Command Center wiring. The Start Simulation and coding features are not functional in this example.  

Hitting "Start Simulation" will give you a compile error here, because there is no microUSB for power in this mockup. Use this embedded Command Center and scroll through the mini-tutorial on the left to understand the pin connections.

The joystick and buttonpad in your command center are just combinations of basic pieces of technologies:  

For example, let's break down what makes up a joystick:

Command Center Wiring

Your joystick is made up of two potentiometers and a tactile button

Depending on how "complete" a circuit is (i.e. how much two leads are touching each other), a potentiometer basically puts out a certain voltage

Two potentiometers working together let you basically detect motion in the X and Y axis

Command Center Wiring

Couple that with a button that detects when pressure is put on the joystick and you have your joystick in front of you!

Each of the wires from the joystick do different things:

Command Center Wiring

Pin 1 (VCC) - Supply voltage(+5V)

Pin 5 (GND) - ground given to Joystick.

Pin 2 ( X-OUT) - This pin provides an analog output voltage from 0 volts to VCC according to the movement in X-direction (axis).

Pin 3 (Y-OUT) - Same as X-OUT but for the Y- direction (axis).

Pin 4 (Switch) - When the switch is pressed, this will connect to VCC through a resistor.

And your buttonpad has four buttons and a ground:

Command Center Wiring

(Pins from top down): (1) L button, (2), Down Button, (3) R button, (4) Up Button, (5) Ground

WIRING COMPLETE!