We took a brief look at the LED API in Johnny-Five in the last chapter, but in this chapter, we will delve deeper and talk about the PWM output and the cousin of the standard LED, the RGB LED—so named because it has a red, green, and blue channel, and can replicate thousands of colors. We will use an RGB LED, as well as some of the more powerful tools built into Johnny-Five, to build an interactive project in this chapter.
Looking at the LED and LED.RGB API
The LED object
The LED object is usually the first thing in Johnny-Five that people look through the documentation for. It's also a great object to use to outline the general structure of the object documentation. Let's take a look at each section and get...