Hero background

Voting Machine Civic Tech

STEM • 45 • 25 students • Created with AI following Aligned with Common Core State Standards

Download now

Free PDF · we'll email you a copy

STEM
45
25 students
25 May 2026

Teaching Instructions

This is lesson 10 of 15 in the unit "Micro:bit Innovations". Lesson Title: Introduction to the Voting Machine: Civic Tech and Data Collection Lesson Description: Students explore the concept of civic technology by designing a digital voting machine using the Micro:bit, connecting the project to real-world applications in elections and surveys. The lesson introduces data collection, tallying, and display as key computer science skills, with a discussion on fairness and accuracy in voting systems. Students begin building the voting machine using MakeCode, setting up button inputs to cast votes and a display to show results. MakeCode project overview: Voting Machine with button A and B for two options, variable tallies, and LED display of results.

Overview

Students connect civic technology to real-world elections and surveys by building a Micro:bit “voting machine” in MakeCode. The lesson also strengthens grade-appropriate math reasoning by tallying results, interpreting ratios, and using signed numbers to represent changes (e.g., vote differences between groups).

Learning intentions

Students will be able to:

  • explain what a civic technology tool does and why fairness and accuracy matter
  • build a MakeCode program where button presses update separate vote tallies
  • display the current winner or vote count on the Micro:bit LED screen
  • interpret vote totals using rational number ideas (quotients and distances) to answer questions about “who has more” and “by how much”

Success criteria

  • I can describe how the voting machine collects input data and stores it as tallies.
  • I can write MakeCode logic so Button A and Button B each add 1 to the correct variable.
  • I can show results on the LED display using the correct variable(s).
  • I can interpret a comparison of vote totals by describing the difference using rational-number thinking (distance/absolute value) and explain what it means in context.

Curriculum links

  • The Number System — add and subtract rational numbers; represent on a number line.
  • The Number System — understand opposites and additive inverses in rational contexts (CCSS.MATH.CONTENT.7.NS.A.1b).
  • The Number System — subtraction as adding the additive inverse, and distance as absolute value (CCSS.MATH.CONTENT.7.NS.A.1c).
  • The Number System — understand division resulting in rational numbers; interpret quotients in context (CCSS.MATH.CONTENT.7.NS.A.2b).

Lesson structure (45 minutes)

  1. 0–5 min · Hook (civic tech scenario). Teacher shows a quick prompt: “A student council needs fair voting. How could a small device reduce mistakes?” Students turn and talk, then share 1 idea about accuracy/fairness.

  2. 5–12 min · Mini-lesson: what the voting machine must do. Teacher outlines the MakeCode plan: Button A = Option 1, Button B = Option 2; each press updates a tally variable; LED displays the results. Students record the three required features in their notebooks.

  3. 12–20 min · Model the MakeCode skeleton. Teacher builds or displays a skeleton project: create two variables (tallyA, tallyB), set initial values to 0, then add event blocks for on button A pressed and on button B pressed. Students echo the structure on their devices, using guided step cards.

  4. 20–29 min · Build: voting logic + display. Teacher prompts: “How will the Micro:bit show progress? What should it display after each vote?” Students implement one of two display options:

  • show tallyA (then later tallyB), or
  • show the “leader” (which count is bigger) using an LED readout method (example: display A’s count when tallyA > tallyB, otherwise display B’s count). Teacher circulates to check variable updates.
  1. 29–36 min · Fairness and accuracy math talk (quick reasoning). Teacher writes a sample scenario on the board: “Option A gets 12 votes, Option B gets 9.” Students answer:
  • “What is the difference?” (Use distance/absolute value meaning: 12 − 9 = 3.)
  • “If we label A as positive and B as negative, what does +3 and −3 represent?” Teacher connects difference and direction to additive inverses (opposites cancel to 0) and emphasizes that “distance” is always nonnegative.
  1. 36–43 min · Test rounds (data collection check). Teacher runs a class “two-minute vote drill” (students press buttons during test, then stop). Students verify the displayed results match the tallies they expected. Teacher asks: “Were there any missed presses? What design choices could reduce errors?”

  2. 43–45 min · Exit ticket (15 seconds to write, 2 minutes to share). Students complete 3 prompts on paper or in a form:

  • Write the purpose of each button in your project.
  • If tallyA = 8 and tallyB = 11, what is the absolute difference?
  • Interpret a quotient in context: If 20 total votes were cast and Option A has 5, what fraction/ratio idea describes Option A’s share? (Students may write 5/20 and simplify if they choose.)

Resources

  • Micro:bit devices (1 per student or per pair)
  • Computers/tablets with MakeCode editor ready
  • MakeCode starter template or step card for “Voting Machine with button A and B”
  • Variable tally printout sheet (tallyA, tallyB definitions)
  • LED display decision guide (show count vs show leader)
  • Notebook paper for civic tech notes and exit ticket
  • Optional: quick vote cards for teacher demo (Option A/Option B)

Assessment

  • Formative checks while building: teacher verifies each student’s button events correctly increment the right variable.
  • Formative reasoning check during the board math talk: students correctly compute difference as distance/absolute value and explain direction with opposites.
  • Exit ticket accuracy: correct description of button purpose and correct difference; quotient/ratio interpretation for Option A’s share.

Differentiation

  • Support:
  • Provide sentence starters: “Button A is used to…,” “After each press, the variable…,” “The difference means…”
  • Use partially completed MakeCode blocks (events and variable setup) so students focus on increment + display.
  • Extension:
  • Ask advanced students to add a third screen behavior: display “A wins” vs “B wins” when counts differ, and “Tie” when equal.
  • Challenge them to compute a “vote share” quotient (e.g., tallyA / totalVotes) and display a simplified value or an indicator.
  • EAL/SEN:
  • Offer visual block labels and a word bank (vote, tally, option, total, difference, share).
  • Allow oral responses for the math reasoning while still requiring the exit ticket computations.

Create Your Own AI Lesson Plan

Join thousands of teachers using Kuraplan AI to create personalized lesson plans that align with Aligned with Common Core State Standards in minutes, not hours.

AI-powered lesson creation
Curriculum-aligned content
Ready in minutes

Created with Kuraplan AI

Generated using openai/gpt-5.4-nano

🌟 Trusted by 1000+ Schools

Join educators across United States