Hey Guys -
I'm working on a project for my 3 year old which I'm trying to add some RGB LEDs to and need some help with two topics, please.
First, I'm using a NodeMCU and have read that each GPIO provides 12Ma @ 3.3V. Given that the RGB LEDs are rated as (Red: DC 2.0 - 2.2V; Blue&Green: DC 3.0 - 3.2V (IF=20mA)), are common cathode, and obviously require 3 GPIOs each (1 per color). Given that I want all 4 of them to act the same, what would be the best way to wire these up? Should I split them up and drive two on 6 pins? Resistor(s) needed for red one? I've researched and seen a variety of answers. To note, the only other thing attached to the NodeMCU will be an MPU-6050.
The other issue is that I've been testing trying to get them to fade white on and off at the top of the loop while flashing a color in between for a few seconds depending on if statements. The only way I could get a smooth fade would be to use a library like RGB_LED. With it, I've been able to get a test LED to fade the way I want between different colors, but not white & off only. I've tried a number of combinations of the code without luck. Any suggestions?