Wednesday, March 27, 2019

Halloween prop server success

Just a quick note from yesterday's projects.    As I mentioned before, I am working on a prop server that will control all my props.  One of the props, which has dual functions has to have a different client software to work with the server.  I am using threading so that it displays a lighting display, but also listens to the server at the same time for any interrupts. So, if the server has not requested for the neopixel to write out a message, it would just do some random display thing.  I thought it would understand some of the basic python programming but I soon learned that micropython is a bit different.  So I had to change a few things in order to get it to work.  I am happy to say that last night was the first successful trial of it working.  I tested the server with 3 fake clients and the esp32 neopixel client while connected to the neopixels.  After all clients connected to the server, the neopixel client started up with doing my running programming. Which is just the leds ramping up etc.  Nothing exciting.  When the server told the neopixel client to stop and write out text to its neopixels, it did exactly that.  Afterwards, it returned to running the running programming as before.  There are actually 4 or 5 startup programs that the esp32 will pick from.  I only have one running now.  So that will be my next thing I need to do is have the esp32 randomize which startup program it will play, and if the server request for it to write, then it will stop and write out "Happy Halloween" etc.   When finished will continue with the startup programs until the server request for it to display the message again.





Video kinda of gives you an idea of what the running program does.

No comments: