Jump to content

Recommended Posts

I configured my Raspberry Pi as a LAMP server.

I have LEDs connected to my RP and can control them with c/c++ programs.


Now I want to built a web interface to control the colors of my LEDs.


For my first attempt I used JQuery to send different commands to a PHP script that would execute a program with the color as a parameter.

This doesn't seems to be the best solution, because I'm pretty limited on any effects I can make.


So my second idea was to use sockets to send information to my program.

This means my ledControler program listens for incoming commands and executes them.

For this I used Websockets, but since I didn't use a library for my c++ program, it was very painfull to implement the whole WebSocket RFC.


Another idea was to use PHP sockets. But I didn't test it out.


My question is, am doing this completely wrong? Is there a simpler preferred way to do this?

Link to post
Share on other sites

Although I own a Raspberry Pi I have not messed with it much. I suspect that there are probably Raspberry-Pi-specific forums where you might find many more people who might know these answers.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...