-->
Page 2 of 2

Re: Need help figuring out simple approach for friendship la

PostPosted: Sun Aug 12, 2018 4:16 pm
by freakintoddles
@rudy after doing some research, I think the simplest way to do this is the following:

- Each time a button (or whatever physical trigger I end up going with) is pushed on the esp8266, it will cycle the attached RGBLED though a series of preset colors.

- ~5 seconds after the last button press (to allow for consideration of which color to choose) the esp8266 will POST to a php script stored on a public web server the color choice, probably just a simple number corresponding to the color preset.

- The PHP script will write the value to a txt file on the server. Each time a new value is received from either lamp, this .txt file is overwritten with the latest choice

- Every 30-60 seconds or so, each esp8266 will check the contents of the .txt file on the server to read the latest value and set its RDGLED to the value that has been set if it has changed.

Do you (or anyone else) see any flaws in this approach? I don't have a need for it to be realtime between the two, so a lag of 30-60 seconds is perfectly fine.

Re: Need help figuring out simple approach for friendship la

PostPosted: Sun Aug 12, 2018 7:50 pm
by rudy
Sounds good. There are a number of ways to accomplish this. You have a plan, so now you just have to do it.