1 (edited by bjr 2018-02-25 12:02:17)

Topic: rgb color - how to set pins?

It must be so simple i'm missing it? How do you set which pins to use for a rgb led strip?
Are there any examples for this?

tia
bjr

2

Re: rgb color - how to set pins?

Welcome,

The values of the color wheel are in the RemoteXY struct, you then use these values to do whatever you want.

3

Re: rgb color - how to set pins?

Sorry, huh? I am looking for how to specify what pins to hook an rgb strip to. There is nothing for it in the online editor. So it must have to be added to the aruino sketch.
thanks
bjr

4 (edited by Guillaume 2018-02-27 19:05:06)

Re: rgb color - how to set pins?

You probably want to use function analogWrite on whatever pins you want and with whatever values you want, either hardcoded or provided by RemoteXY's struct... smile

void loop()
{
  analogWrite( pinRed, RemoteXY.valueRed );
  analogWrite( pinGreen, RemoteXY.valueGreen );
  analogWrite( pinBlue, RemoteXY.valueBlue );
  ...
}

5

Re: rgb color - how to set pins?

Guillaume,
Thanks for the reply. Unfortunately I am just starting out with all of this so your response left me even more confused. I tried finding someone on fiverr to write what I needed, but that isn't working out either. So I just went with Blynk. It does leave me needing an internet connection, but at least i got it working. Perhaps in the future RemoteXY will have pin assignments like Blynk or someone has an example I can use.

thanks again
bjr

6 (edited by Guillaume 2018-03-01 00:44:21)

Re: rgb color - how to set pins?

Learn how to control the led strip without RemoteXY or Blynk, and then it will be easy to add RemoteXY, if you want to try again smile

https://learn.adafruit.com/rgb-led-strips/arduino-code