# Ir receiver sunfounder and rgb led

**URL:** https://discourse.nodered.org/t/ir-receiver-sunfounder-and-rgb-led/75503
**Category:** General
**Created:** [21 February 2023 09:12 UTC](https://discourse.nodered.org/t/ir-receiver-sunfounder-and-rgb-led/75503 "2023-02-21T09:12:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![donuait](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@donuait](https://discourse.nodered.org/u/donuait)
#### Post date: [21 February 2023 09:12 UTC](https://discourse.nodered.org/t/ir-receiver-sunfounder-and-rgb-led/75503/1 "2023-02-21T09:12:54Z")

</div>

Good morning everyone. I would like to create a node-red flow that allows me to assign commands to the ir receiver through a sunfounder remote control that allow me to change the color of an rgb led. The RGB led sensor is connected to the raspberry, R to GPIO25, G to GPIO27, B to GPIO12. The ir receiver is connected to raspberry via GPIO23. Through the button 1 of the remote control I would like the coloring of the LED "white", through the button 2 I would like the coloring "blue", through the key 3 I would like the red coloring and through the key 4 I would like the purple coloring. Can anyone help me?

---

<div class="post-metadata">

### Author: ![brendonhatcher](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@brendonhatcher](https://discourse.nodered.org/u/brendonhatcher)
#### Post date: [21 February 2023 12:33 UTC](https://discourse.nodered.org/t/ir-receiver-sunfounder-and-rgb-led/75503/2 "2023-02-21T12:33:02Z")

</div>

Hi

I would break this into several steps.

**1. Make sure that you have the right approach for the RGB LED.**  
Is it a single bulb or a strip? The single bulb is (usually) driverless and is just controlled by PWM from the Raspberry Pi pins. A strip uses a driver and you'll need a Node-RED node that works with the driver.

**2. Make sure the RGB LED is wired correctly**  
For example, GPIO25 doesn't have PWM, so I don't see how you could vary the intensity of the Red output.  
Have a look at [https://www.instructables.com/Raspberry-Pi-Tutorial-How-to-Use-a-RGB-LED/](https://www.instructables.com/Raspberry-Pi-Tutorial-How-to-Use-a-RGB-LED/)

**3. Create a flow which controls the RGB output (without the IR)**

**4. Create a flow that receives the IR receiver**  
I don't see any node for "sunfounder".  
Can you provide a link to the product description and data sheet?

**5. integrate the 2 flows**

---

<div class="post-metadata">

### Author: ![donuait](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@donuait](https://discourse.nodered.org/u/donuait)
#### Post date: [23 February 2023 08:20 UTC](https://discourse.nodered.org/t/ir-receiver-sunfounder-and-rgb-led/75503/3 "2023-02-23T08:20:17Z")

</div>

I found this link that should explain how IR and remote control should work: [Lesson 23 IR Remote Control — SunFounder SunFounder\_SensorKit\_for\_RPi2 documentation](https://docs.sunfounder.com/projects/sensorkit-v2-pi/en/latest/lesson_23.html)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [24 April 2023 08:21 UTC](https://discourse.nodered.org/t/ir-receiver-sunfounder-and-rgb-led/75503/4 "2023-04-24T08:21:14Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
