Arduino · Einsteiger · Stufe 7 / 40
PWM, Colour and Sound
Produce brightness, colour and tones with PWM and timed signals and store patterns in arrays.
Einsteiger freischalten · CHF 9.90 Stufen 1–13, einmalig, kein Abo
10 Lektionen in dieser Stufe
- Pulse Width Modulation and Duty Cycle
Explain how rapid switching creates an average output and which UNO pins support it. · Lab: Measure the average voltage on a PWM pin at 25, 50 and 75 percent duty with a multimeter. - Fading an LED with analogWrite
Ramp a duty cycle up and down with loops. · Lab: Create a smooth breathing light on pin 9. - A Potentiometer-Controlled Dimmer
Link an analog input to a PWM output with correct scaling. · Lab: Dim an LED from a knob and print both the input and output values. - Mixing Colours on an RGB LED
Drive three PWM channels to produce any colour. · Lab: Set colours by typing three numbers into the Serial Monitor. - Perceived Brightness and Gamma Correction
Use a lookup table so brightness steps look even to the eye. · Lab: Fade an LED linearly and with a gamma table and compare the look. - Active versus Passive Buzzers
Tell the two types apart and drive each correctly. · Lab: Sound an active buzzer with a steady level and a passive one with a toggled pin. - Playing Notes with tone and noTone
Generate a frequency for a set duration. · Lab: Play a rising scale and an alarm siren. - Storing a Melody in Arrays
Hold note and duration data in parallel arrays and step through them. · Lab: Compose and play a short jingle of your own from two arrays. - Random Numbers with random and randomSeed
Generate pseudo-random values and seed them from an unconnected analog pin. · Lab: Light random LEDs and show the sequence repeating without a seed. - A Light-Controlled Pitch Instrument
Combine an analog sensor, mapping and tone into one interactive instrument. · Lab: Play pitches by moving your hand over the photoresistor and add a mute button.
Abschlussprojekt
A four-colour memory game with LEDs, buttons and tones that grows a random sequence each round.
Teile für diese Stufe
- 1 × UNO-compatible board
- 1 × USB cable matching the board
- 1 × Solderless breadboard 830 points
- 1 × Jumper wire set male-male
- 1 × RGB LED common cathode
- 4 × LED 5 mm assorted
- 7 × Resistor 220 ohm
- 3 × Potentiometer 10 kilohm
- 1 × Passive buzzer
- 1 × Active buzzer
- 4 × Tactile push button
- 1 × Photoresistor (LDR)
- 1 × Resistor 10 kilohm
In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Arduino-kompatibel →
Voraussetzung: Levels 1–6: analog input, map, arrays, functions and buttons.