MicroPython Cookbook
上QQ阅读APP看书,第一时间看更新

There's more...

In older versions of the library, you could provide the colors as a list of three integers, instead of a tuple of three integers. It is best to avoid doing this and stick to using tuples instead of lists. This is because your code will work in both the newer and older versions of the library.

Each NeoPixel is made up of a red, green, and blue LED. When you set the strength of each color in this recipe, it directly changes the brightness levels of these individual LEDs. It is a possible to use a consumer microscope to view each of the three individual LED lights that make up each NeoPixel. The following photograph is taken from one of these consumer grade microscopes with a magnification of 200x. As you can see, the separate red, green, and blue LEDs are clearly visible: