appideasDOTcom / APPideasLights

Arduino and mobile app code for the APPideas Lights projects
19 stars 5 forks source link

Arduino - Possible race condition #18

Open appideasDOTcom opened 5 years ago

appideasDOTcom commented 5 years ago

I have noticed that, on controllers that are far away from my WiFi router and have a poor WiFi signal, there are times when I will set a light's colors, watch the colors change successfully, leave that controller's screen, come back into the controller's screen of controls, and one of the sliders is set to an incorrect value. I verified that http://:5050/status returned the wrong value.

I have only noticed this behavior on devices that have a poor WiFi signal, and I cannot reproduce it at will. I believe that there is a race condition on the Arduino side between changing the values of the pins and changing the values stored in the status array, and it appears to be affected by network lag.

My assessment of the cause is only speculation based on my observation of the symptoms at this point.