DEVLOG 008
I worked on a large portion of the main program, which is nearing completion now. The main parts I worked on were the automatic slewing, automatic tracker reset, and live-updating speed adjustments. This means that when I press the track button, it starts at position zero, and it measures the number of millimeters it travels over time, and you can see it live-updating on the position number on the HTML webpage. This took me a while to code, as I initially used a blocking code, which used the delay() function to send individual number of steps to the motor, and then change the number afterwards, but it was not a very professional setup, so I made it much better by using globals like trackingState, or resetState, that allow me to simply turn them on and off, and use the in built microseconds timer, to make the motor take each step at the correct time, to get the correct speed. The slewing commands were also upgraded to use this general, fully non-blocking system throughout the entire code.
I also removed the night mode feature as it wouldn’t help block much of the light either way, so I will encourage users to use a filter on their main phone. I got the set zero position button to work easily, as well as the reset button. I also managed to use the preferences library on the ESP32 to permanently store any speed changes, so that if the speed is adjusted, you do not have to recode it or change the number manually again.
Overall, I truly believe I learned so much over this huge period of time, and I am much better at using this kind of ESP32 webpage setup, as well as C++, HTML, JavaScript, and CSS, much, much more.
This should be the second-to-last DEVLOG, as I really have only small amounts of things left to code, and for the next DEVLOG, I will just do a lot of final publication stuff and film the YouTube demo video. These coding things include:
- Autonomous safety stop at max angle
- A time estimate feature that tells me roughly how much time I have before I have to reset it.
And a few more.
There are a few things I wish to add in the future, like a dew heater and temperature monitor system, but those are large projects and will take a while to get working correctly, so I will likely make them at a later time. The Arduino code is up to 500 lines, with the HTML page being around 200 lines of it.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.