When using the RGB LED driver and the .setRGB() function, the PWM value is not set correctly. The MRAA specifications say that the Pwm.write() function takes a float value representing the percentage of the duty cycle, however the setRGB function parses the hexadecimal color code into three one-byte values ranging from 0-256 and passes those directly to the pwmWrite function. This means that the colors #FF0100 and #FFFF00 look identical.
This can be fixed by changing the following code (rgb-led.js:82-84):
When using the RGB LED driver and the .setRGB() function, the PWM value is not set correctly. The MRAA specifications say that the Pwm.write() function takes a float value representing the percentage of the duty cycle, however the setRGB function parses the hexadecimal color code into three one-byte values ranging from 0-256 and passes those directly to the pwmWrite function. This means that the colors #FF0100 and #FFFF00 look identical.
This can be fixed by changing the following code (rgb-led.js:82-84):
to this:
I'd be happy to make a pull request if this is determined to be an acceptable solution for this issue.