Lesson plan

Build a guitar controller lesson plan

A rhythm game guitar on a Pro Micro in three short lessons: frets and a strum bar that never double-strums, a whammy and star power, and your own config.

2 chapters, 3 lessons, about 1 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

  • Frets, a strum bar, a whammy and a tilt switch, each read cleanly.
  • The config block, left-handed play, and the step to a real board.

Materials for the whole unit

  • Arcade button x 5
  • Full-size breadboard
  • Limit switch, lever microswitch x 2
  • Potentiometer
  • Pushbutton
  • SparkFun Pro Micro
  • Tilt switch

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 40 min

The inputs

Frets, a strum bar, a whammy and a tilt switch, each read cleanly.

LessonTimeWhat students do
Frets and the strum barFive fret buttons and two strum switches on a Pro Micro, each on its own pin with the pull-up on, and a lockout that turns a bouncing strum into one note.20 min
  1. Run it
  2. Hold a chord, then strum
  3. One strum, one note
  4. The strum bar as a hat switch
The whammy and star powerA whammy pot calibrated with a rest point and a deadzone, and a ball tilt switch that turns the neck going up into a button.20 min
  1. Push the whammy
  2. Rest and deadzone
  3. Tip the neck up
  4. Button 6

Materials

  • Arcade button x 5
  • Full-size breadboard
  • Limit switch, lever microswitch x 2
  • Potentiometer
  • Pushbutton
  • SparkFun Pro Micro
  • Tilt switch

Check for understanding

Each student finishes "The whammy and star power" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

Chapter 2. About 20 min

Your guitar

The config block, left-handed play, and the step to a real board.

LessonTimeWhat students do
Make it your guitarThe config block at the top of the sketch: pins, left-handed play, lockouts and calibration, then what changes when you flash a real Pro Micro.20 min
  1. The config block
  2. Left-handed
  3. Strum with every fret
  4. On a real Pro Micro

Materials

  • Arcade button x 5
  • Full-size breadboard
  • Limit switch, lever microswitch x 2
  • Potentiometer
  • Pushbutton
  • SparkFun Pro Micro
  • Tilt switch

Check for understanding

Each student finishes "Make it your guitar" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "On a real Pro Micro".

Your class

Teach this unit as a class

Start a class from this course and its 3 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.