-
Notifications
You must be signed in to change notification settings - Fork 279
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
Comments
This can already be achieved. First declare Then pass the RGB values as parameters in the GET request, e.g: In the setup function you need to register a function with the command: Finally you need to declare the function where you would implement the logic: Inside this function you need to split the params variable for obtaining each param value. Hope it helps. |
Thank you so much
can you help me how ?
Inside this function you need to split the params variable for obtaining
each param value.
please write simple sample.
…On Sun, Apr 12, 2020 at 8:16 PM areyalp ***@***.***> wrote:
This can already be achieved.
First declare
#define AREST_PARAMS_MODE 0
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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#275 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZBLNJTE2GDG64CCRL5YJTRMHO5JANCNFSM4KG67J2A>
.
|
Hello Marco
On Monday, April 27, 2020, Omid Kazemi <[email protected]> wrote:
Hi Marco . plz write a sample sketch that describe this . I wrote some
sketch but dosent work.
… Thank you so much
can you help me how ?
Inside this function you need to split the params variable for obtaining
each param value.
please write simple sample.
On Sun, Apr 12, 2020 at 8:16 PM areyalp ***@***.***> wrote:
> This can already be achieved.
>
> First declare
> #define AREST_PARAMS_MODE 0
> 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.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#275 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AFZBLNJTE2GDG64CCRL5YJTRMHO5JANCNFSM4KG67J2A>
> .
>
|
Did you ever get this working as described? |
No description provided.
The text was updated successfully, but these errors were encountered: