Lesson plan

Sim racing and flight sim controllers lesson plan

Template a button box, a shifter with a handbrake and a flight panel on a Pro Micro before you buy the parts.

2 chapters, 4 lessons, about 5 hours, on the SparkFun Pro Micro. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Buttons, toggles, a key switch and encoders that send exactly what a game expects.
  • An H shifter with a handbrake, then an autopilot and gear panel.

Materials for the whole unit

  • Arcade button x 5
  • Four-digit display, TM1637
  • Full-size breadboard
  • Hall sensor, 49E linear
  • LED x 5
  • Limit switch, lever microswitch x 2
  • Resistor x 5
  • Rotary encoder, KY-040 x 2
  • Slide potentiometer x 2
  • Slide switch x 4
  • SparkFun Pro Micro

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 2 h 35 min

The button box

Buttons, toggles, a key switch and encoders that send exactly what a game expects.

LessonTimeWhat students do
Buttons and toggles a game understandsA Pro Micro as a USB game controller: momentary buttons, toggles that send a press per flip, an ignition key that guards START, and lights that follow the switches.85 min
  1. A box the PC sees as a controller
  2. Hold a momentary button
  3. A toggle sends one press
  4. One toggle, two buttons
  5. An ignition key that guards START
  6. Lights that follow the switches
Encoders: every click reaches the gameRead two rotary encoders with a state table that throws contact bounce away, send each click as a short button press, and queue fast spins so none are lost.70 min
  1. Two contacts, a quarter step apart
  2. One click of the TC knob
  3. The other way, on the other knob
  4. Spin it fast
  5. Push the knob

Materials

  • Arcade button x 5
  • Full-size breadboard
  • LED x 3
  • Resistor x 3
  • Rotary encoder, KY-040 x 2
  • Slide switch x 4
  • SparkFun Pro Micro

Check for understanding

Each student finishes "Encoders: every click reaches the game" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Push the knob".

Chapter 2. About 2 h 20 min

Rig and cockpit

An H shifter with a handbrake, then an autopilot and gear panel.

LessonTimeWhat students do
An H-pattern shifter and a handbrakeTurn two pots into a gear with trigger and release lines, push the knob down for reverse, add paddles, and scale a hall-sensor handbrake with dead zones.70 min
  1. Two pots under the knob
  2. Into first
  3. Third, through the middle slot
  4. Reverse: push the knob down
  5. Pull the handbrake
A flight panel: autopilot and gearOne encoder for heading, altitude and vertical speed on a four-digit display, an AP button with its light, and a gear lever with three greens and a red in transit.70 min
  1. What the panel shows, and where that comes from
  2. Turn the heading bug
  3. Push for altitude
  4. Engage the autopilot
  5. Gear down, three green

Materials

  • Arcade button
  • Four-digit display, TM1637
  • Full-size breadboard
  • Hall sensor, 49E linear
  • LED x 5
  • Limit switch, lever microswitch x 2
  • Resistor x 5
  • Rotary encoder, KY-040
  • Slide potentiometer x 2
  • Slide switch
  • SparkFun Pro Micro

Check for understanding

Each student finishes "A flight panel: autopilot and gear" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Gear down, three green".

Your class

Teach this unit as a class

Start a class from this course and its 4 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.