Learn
Circuit Playground: Part 1
NeoPixels: Part 2

So now we know how to turn all the lights into a single color, but how do we turn individual lights on?

Circuit Playground Express has 10 built-in NeoPixels, numbered counterclockwise:

• `cpx.pixels`
• `cpx.pixels`
• `cpx.pixels`
• `cpx.pixels`
• . . .
• `cpx.pixels`

To make the NeoPixel at `0` turn on to red one time:

``cpx.pixels = (255, 0, 0)``

To make the NeoPixel at `0` turn off:

``cpx.pixels = (0, 0, 0)``

Note: Colors are stored as tuples by default. However, we can also use hexadecimal syntax to set values similar to colors on the web. For example, `0x100000` is equivalent to `(10, 00, 00)`. Translated to decimal, it is `(16, 0, 0)`.

### Instructions

1.

Let’s make colors appear in a rainbow-like fashion! 🌈

Inside the `while` loop, set the NeoPixels into these colors below:

• Red: `(255, 0, 0)`
• Orange: `(255, 85, 0)`
• Yellow: `(255, 255, 0)`
• Green: `(0, 255, 0)`
• Forest Green: `(34, 139, 34)`
• Aqua: `(0, 255, 255)`
• Blue: `(0, 0, 255)`
• Dark Blue: `(0, 0, 139)`
• Purple: `(255, 0, 255)`
• Indigo: `(75, 0, 130)`
2.