Quiz: Programmable LED Art with NeoPixel/WS2812B¶
Test your understanding of programmable LED art with NeoPixel/WS2812B with these review questions.
1. What is an addressable LED?¶
- A wire that carries color data from a microcontroller to the first LED in a strip
- An LED that can be individually controlled with its own color and brightness, independent of other LEDs on the same circuit
- A pre-written collection of functions handling low-level LED timing
- An LED that only turns fully on or fully off as a whole
Show Answer
The correct answer is B. An addressable LED is an LED that can be individually controlled, given its own color and brightness independently of every other LED on the same circuit, unlike a simple LED that only turns fully on or off as a whole (option D). Option A describes a data line, and option C describes a NeoPixel library — both related but distinct concepts.
Concept Tested: Addressable LED
2. What does the NeoPixel library's show() method do?¶
- It sets every pixel on the strip to the same color in one command
- It targets one specific pixel index and assigns it an RGB value
- It scales every pixel's brightness by a global multiplier before display
- It pushes the colors set with fill or set pixel color out along the data line to the physical strip
Show Answer
The correct answer is D. The show method is the command that actually pushes whatever colors have been set with fill or set pixel color out along the data line to the physical strip — until it's called, color changes exist only in the microcontroller's memory. Option A describes the fill method, option B describes set pixel color, and option C describes brightness scaling.
Concept Tested: Show Method
3. How does a chained LED protocol allow a single data line to control many independently colored NeoPixels?¶
- Each LED receives the full color stream, keeps the portion meant for its pixel index, and forwards the rest to the next LED in the chain
- Each LED has its own dedicated wire running back to the microcontroller, hidden inside the strip's backing
- The microcontroller sends a separate signal pulse for every LED, timed to arrive at each one simultaneously
- Pixel index is only used for animation timing, not for addressing individual LEDs
Show Answer
The correct answer is A. In a chained LED protocol, each addressable LED receives a stream of color data over the data line, keeps the portion meant for its own pixel index, and forwards the rest of the stream to the next LED — so one data line can control an entire strip regardless of length. Option B contradicts the single-data-line design, option C misdescribes the timing mechanism, and option D understates pixel index's true addressing role.
Concept Tested: Chained LED Protocol
4. What is the relationship between an RGB value and the hue/saturation/brightness properties of a color?¶
- Hue, saturation, and brightness only apply to paint mixing, while RGB values only apply to light mixing
- An RGB value can only represent grayscale colors, while hue/saturation/brightness represents full color
- They are two different ways of describing the same colors, and most NeoPixel libraries let you specify color using either system
- Saturation and brightness are alternate names for the red and blue channels in an RGB value
Show Answer
The correct answer is C. Hue, saturation, and brightness form a second, more human-friendly way of describing exactly the same colors an RGB value describes, and most NeoPixel libraries let you specify color using either system. Option A incorrectly restricts each system to a different medium. Option B is false since RGB values represent full color, not just grayscale, and option D incorrectly equates saturation/brightness with specific RGB color channels.
Concept Tested: Hue
5. A student calls strip.fill((255, 0, 0)) but never calls strip.show(). What happens on the physical LED strip?¶
- The strip immediately turns red because fill() updates the physical LEDs directly
- The strip turns white, since fill() without show() defaults to full brightness
- The program raises an error because show() must be called before fill()
- The strip stays in whatever state it was in before, because color changes only take effect once show() is called
Show Answer
The correct answer is D. Fill and set pixel color only update colors in the microcontroller's memory; the show method is what actually pushes those pending colors out along the data line to the physical strip. Without calling show(), the strip visibly stays exactly as it was before, even though fill() ran successfully. Options A, B, and C all incorrectly assume fill() alone changes the physical LEDs.
Concept Tested: Show Method
6. A NeoPixel strip has 40 pixels, and brightness scaling is set to 0.5. Using a current draw of 60 mA per pixel at full white brightness, what is the worst-case current draw?¶
- 0.6 amps
- 1.2 amps
- 2.4 amps
- 4.8 amps
Show Answer
The correct answer is B. The power budget formula multiplies current draw per LED by pixel count and brightness scaling: 40 pixels x 0.06 amps x 0.5 = 1.2 amps. Option A miscalculates by omitting the pixel count multiplication correctly, option C is the result without applying brightness scaling at all, and option D roughly doubles the correct result.
Concept Tested: Power Budget For LEDs
7. A student wants to change only pixel index 5 to red while leaving every other pixel on a 12-pixel strip exactly as it currently is. Which method call accomplishes this?¶
- strip.fill((255, 0, 0))
- strip[5] = (255, 0, 0) followed by strip.fill()
- strip.set_pixel_color(5, (255, 0, 0)) followed by strip.show()
- strip.brightness_scaling(5, 1.0)
Show Answer
The correct answer is C. Set pixel color targets one specific pixel index and assigns it its own RGB value while leaving every other pixel unchanged, and show() is required afterward to push that change to the physical strip. Option A would overwrite every pixel to red, not just pixel 5. Option B misuses fill() after direct indexing, and option D misapplies brightness scaling, which is a global multiplier, not a per-pixel color setter.
Concept Tested: Set Pixel Color
8. A student is designing a calm, elegant wearable bracelet meant to be worn for hours without being distracting. Based on the chapter's animation technique table and the discussion of wearable electronics, which combination best fits this goal?¶
- A slow color fade behind an LED diffuser, since fade reads as calm and a diffuser softens individual pixel points into a smoother glow
- A fast sparkle animation at full brightness with no diffuser, since sparkle looks the most exciting
- A rainbow cycle at the highest possible frame rate, since more colors always look better on a wearable
- A chase animation with no color palette restriction, since chase is energetic and directional
Show Answer
The correct answer is A. The chapter's technique table describes color fade as calm and smooth, and an LED diffuser softens and blends individual pixel points of light into a smoother glow — especially useful in wearable projects where the strip itself shouldn't be visible. Options B and D describe energetic, attention-grabbing techniques unsuited to a calm goal, and option C assumes more color variety is automatically better, which the chapter does not support.
Concept Tested: Wearable Electronics
9. A student's program calls strip.fill((0, 255, 0)) and strip.set_pixel_color(3, (255, 0, 0)) in sequence, but the physical strip stays completely dark with no error message. What is the most likely cause?¶
- The pixel index used, 3, does not exist on the strip
- The current draw exceeded the power budget and the strip shut itself off
- The RGB values used are outside the valid 0-255 range
- The strip.show() call was never made, so the pending color changes were never pushed out to the physical LEDs
Show Answer
The correct answer is D. Both fill and set pixel color only update colors in memory; without a following strip.show() call, none of those changes reach the physical LEDs, exactly matching a strip that stays dark despite no error being raised. Option A would typically raise an index error rather than fail silently. Option B and C describe failure modes the chapter does not associate with a silently dark strip.
Concept Tested: Show Method
10. A student's chase animation is supposed to look like a continuously moving light along the strip, but it instead looks like individual pixels blinking on and off with visible gaps. According to the chapter's frame-rate sensitivity guidance, what is the most likely cause?¶
- The color palette used too many colors for a chase animation
- Brightness scaling was set too high, overloading the power supply
- The frame rate is too low for a chase animation, which needs roughly 20+ FPS to look continuous
- The pixel index values were assigned in the wrong order
Show Answer
The correct answer is C. The chapter's animation table notes that chase animation has medium frame-rate sensitivity and needs roughly 20+ FPS to look continuous; running below that threshold makes the animation look like individual blinks instead of smooth motion. Option A misapplies color palette size, which affects visual coherence, not motion smoothness. Option B and D describe unrelated failure modes not tied to the described symptom.
Concept Tested: Frame Rate