Adafruit IO Basics: Color- Cathode Edit Recommendation

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
pumpkinheadnick
 
Posts: 85
Joined: Mon Jan 04, 2016 8:23 pm

Adafruit IO Basics: Color- Cathode Edit Recommendation

Post by pumpkinheadnick »

Hello. I just got the Adafruit Feather HUZZAH ESP8266 and was doing some examples like this one (https://learn.adafruit.com/adafruit-io- ... duino-code) but noticed that it was not working for me. After reading through the code page I noticed a line that said
Because we are using a common anode RGB LED, we will need to flip the incoming RGB values. We do this by subtracting the values from 255 before sending the values to analogWrite.

If you are using a common cathode RGB LED, you can send the values directly to analogWrite from data->toRed(), data->toGreen(), and data->toBlue().
but after making the code modification it was still not working. After some more research I found that I needed to change the 3.3v wire to a ground wire. I think that you should include a line about that in the documentation. Maybe also include it on the "wiring" tab too.

I mean I do see that it says
1x diffused RGB LED - common anode
but honestly I did not know there were two different types of leds or how to tell the difference until I read this page...

https://randomnerdtutorials.com/electro ... n%20anode.

That is all. Hope that I can help improve the example for others.

User avatar
brubell
Learn User Page
 
Posts: 2017
Joined: Fri Jul 17, 2015 10:33 pm

Re: Adafruit IO Basics: Color- Cathode Edit Recommendation

Post by brubell »

Hi, thanks for providing feedback. I have bolded the type of LED listed on the Wiring page and added emphasis (bolded) to the "If you are using a common cathode RGB LED" on the code page.

Does this seem more clear?

User avatar
pumpkinheadnick
 
Posts: 85
Joined: Mon Jan 04, 2016 8:23 pm

Re: Adafruit IO Basics: Color- Cathode Edit Recommendation

Post by pumpkinheadnick »

Sorry for the delay.

But yeah, that could work.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”