Students will
- Identify the shared and individual RGB LED leads
- Protect each color channel with its own resistor
- Use three PWM values to create and document mixed colors
Arduino Uno R3
Control the red, green, and blue channels independently, then mix repeatable colors with PWM values.
Reviewed connection map
Read before uploading
const int RED_PIN = 9;
const int GREEN_PIN = 10;
const int BLUE_PIN = 11;
void setColor(int red, int green, int blue) {
analogWrite(RED_PIN, constrain(red, 0, 255));
analogWrite(GREEN_PIN, constrain(green, 0, 255));
analogWrite(BLUE_PIN, constrain(blue, 0, 255));
}
void setup() {
pinMode(RED_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
}
void loop() {
setColor(255, 0, 0);
delay(800);
setColor(0, 255, 0);
delay(800);
setColor(0, 0, 255);
delay(800);
setColor(120, 30, 180);
delay(800);
}Optional engineering record
Choose the prompts that help students explain predictions, evidence, debugging, and transfer. Saving creates a new entry in this browser’s Rudi notebook.
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.
Disconnect power and verify that channel's lead, resistor, breadboard row, and matching PWM pin.
Verify whether the actual LED is common cathode or common anode and adapt both the shared connection and PWM values.
2026 middle school standards
These are evidence-based crosswalk candidates for curriculum review—not a claim of official alignment.
Students manipulate three integer channel values to create and compare color outputs.
Lesson evidence: Three documented PWM recipesStudents isolate variables, compare observed behavior with the intended purpose, and document a revision.
Lesson evidence: Independent-channel and mixed-color testohms-law · power-and-signals · sketch-foundations
Starting point, not verified curriculum. Review the actual hardware, circuit, code, power requirements, and classroom conditions.
After teaching this lesson