Guided physical computing, beginning with the Arduino Starter Kit Classroom Pack

Arduino Uno R3

State to sound

Generate clear piezo feedback and use frequency, duration, and silence to communicate program state.

CSTA 2026 mapping candidatesNot reviewed by CSTA
MS-PRO-RD-17ProgrammingMS-PRO-TR-19Programming

Students will

  • Connect and test a piezo output
  • Use tone and noTone to control audible feedback
  • Design distinguishable sounds for different states

Evidence of success

  • The piezo starts and stops under program control
  • Two states produce distinguishable patterns
  • Important information has an equivalent visible or written cue

Hardware

  • Arduino Uno R3
  • Piezo element from the Starter Kit
  • Breadboard and jumper wires

Prerequisites

  • Build a digital output
  • Recognize a program condition

Before class

  • Verify whether the kit part is a passive piezo element
  • Set a reasonable classroom sound level
  • Provide a non-audio equivalent for important feedback

Reviewed connection map

Piezo sound output

Arduino D8tone output
PiezoKit sounder; verify its marked polarity if present
GNDReturn path
  1. Connect the piezo between D8 and GND using the reviewed kit circuit.
  2. Keep an equivalent visible or written cue available for accessibility.

Build and test

  1. 01Connect the piezo between D8 and GND
  2. 02Play one short test tone
  3. 03Create two patterns with different frequency or rhythm
  4. 04Connect each pattern to a named program state
  5. 05Ask a listener to identify the states without viewing the sketch

Read before uploading

Annotated Arduino sketch

const int PIEZO_PIN = 8;

void setup() {}

void loop() {
  tone(PIEZO_PIN, 440, 150);
  delay(300);
  tone(PIEZO_PIN, 660, 150);
  delay(700);
}

Optional engineering record

Record evidence from this lesson

Choose the prompts that help students explain predictions, evidence, debugging, and transfer. Saving creates a new entry in this browser’s Rudi notebook.

Record your thinking — optional4 prompts

Use these prompts if they help students capture evidence, decisions, or questions. You do not need to complete every prompt or create an entry at every step.

Nothing is saved until you choose this button.

Troubleshooting

No sound is audible

Verify the piezo connection, output pin, frequency, duration, and whether the actual part requires a different drive method.

The sound never stops

Use a duration with tone or call noTone before leaving the state.

2026 middle school standards

Potential CSTA connections

Not reviewed by CSTA

These are evidence-based crosswalk candidates for curriculum review—not a claim of official alignment.

MS-PRO-RD-17

Analyze the roles of iteration, selection, variables, and procedures in a segment of code.

Students trace variables, selection, or iteration in the supplied sketch and connect code to physical behavior.

Lesson evidence: State-to-frequency trace
MS-PRO-TR-19

Use systematic strategies to test, refine, and document changes to a computing technology to meet the intended purpose.

Students isolate variables, compare observed behavior with the intended purpose, and document a revision.

Lesson evidence: Audible response test record
View the official 2026 CSTA standardsStandard text: Computer Science Teachers Association (2026), CC BY-NC-SA 4.0.

Supporting concepts

power-and-signals · sketch-foundations

Sources and review

Arduino Uno R3 documentationArduino Projects Book · CC BY-NC-SA 3.0Arduino tone reference

Starting point, not verified curriculum. Review the actual hardware, circuit, code, power requirements, and classroom conditions.

After teaching this lesson

Make one bounded change—or connect the skill to a project.