RGB LED flash in multiple colors

I want to flash an RGB LED in different colors. Arduino code looks like:

setColor(255, 0, 0); // red
setColor(0, 255, 0); // green
setColor(0, 0, 255); // blue

How would i Node this out?

This is explained here: https://xod.io/docs/guide/simple-traffic-light/ using “led” nodes. Your RGB LED will be connected to 3 Arduino pins, so you should be able to use “led” nodes instead of setColor().

Also, you can watch a recent video where @dronebotworkshop does exactly that.

1 Like