Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can send 3 parameter for controling RGB Led? Enhancement #275

Open
OmiD-K opened this issue Jan 15, 2020 · 4 comments
Open

How can send 3 parameter for controling RGB Led? Enhancement #275

OmiD-K opened this issue Jan 15, 2020 · 4 comments

Comments

@OmiD-K
Copy link

OmiD-K commented Jan 15, 2020

No description provided.

@OmiD-K OmiD-K changed the title How can 3 parameter via controling RGB Led? How can send 3 parameter for controling RGB Led? Jan 15, 2020
@OmiD-K OmiD-K changed the title How can send 3 parameter for controling RGB Led? How can send 3 parameter for controling RGB Led? Enhancement Jan 15, 2020
@areyalp
Copy link

areyalp commented Apr 12, 2020

This can already be achieved.

First declare
#define AREST_PARAMS_MODE 1
before importing the arest library.

Then pass the RGB values as parameters in the GET request, e.g:
http://192.168.0.10/RGBfunction?red=value1&green=value2&blue=value3

In the setup function you need to register a function with the command:
rest.function("RGBfunction",RGBledControl);

Finally you need to declare the function where you would implement the logic:
int RGBledControl(String params){}

Inside this function you need to split the params variable for obtaining each param value.

Hope it helps.

@OmiD-K
Copy link
Author

OmiD-K commented Apr 27, 2020 via email

@OmiD-K
Copy link
Author

OmiD-K commented Jul 19, 2020 via email

@ralbright-wa
Copy link

Did you ever get this working as described?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants