# RGB LED flash in multiple colors

**URL:** <https://forum.xod.io/t/rgb-led-flash-in-multiple-colors/742>\
**Category:** Uncategorized\
**Created:** [May 4, 2018, 2:23pm UTC](https://forum.xod.io/t/rgb-led-flash-in-multiple-colors/742 "2018-05-04T14:23:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinemmons](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@justinemmons](https://forum.xod.io/u/justinemmons)\
**Post date:** [May 4, 2018, 2:23pm UTC](https://forum.xod.io/t/rgb-led-flash-in-multiple-colors/742/1 "2018-05-04T14:23:23Z")

</div>

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

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

How would i Node this out?

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [May 4, 2018, 3:23pm UTC](https://forum.xod.io/t/rgb-led-flash-in-multiple-colors/742/2 "2018-05-04T15:23:15Z")

</div>

This is explained here: [https://xod.io/docs/guide/simple-traffic-light/](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().

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [May 4, 2018, 4:58pm UTC](https://forum.xod.io/t/rgb-led-flash-in-multiple-colors/742/3 "2018-05-04T16:58:37Z")

</div>

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