Successful Compile of First RTOS C++ Project!

Published by

on

Over the past few days, I was able to partially complete a project I had been toying with for a long time now. When I say “partially”, I certainly mean it in the full essence of the word. Out of the various components, I dialed in my focus on Arduino coding to ensure that the more than one dozen separate modules of C++ code would compile.

It did! What joy was it to finally see a goal come to completion. The realization that I was capable was thrilling. I was not a C++ expert but had enough knowledge for some basics and the overall context of the language. I knew how to dial in to the code and understand what it was doing. I generally knew the syntax and how things were referenced. But AI proved to be at least partially useful.

Now, don’t run away or roll your eyes too quickly. I found AI able to give me directional suggestions, but it was incapable of producing a program able to be compiled on its own. Furthermore, I wanted to take the opportunity to learn from some examples it shared either of (mostly) working code or fixes it suggested. This was AI’s strength: directionality.

Instead of getting lost in the abyss, I was able to use the strength of the LLM to explore the concept, including important aspects I should consider for strengthening the overall design. Was I weak on network communication resiliency? Well, let’s think about doing some checksums. What were some pros and cons of file compression and then decompression on the other end for improving performance on an RS485 serial network?

That, my friends, proved to be incredibly useful above all. Sorting through ideas I had, evaluating how complex and feasible they were to implement, and, of course, how critical anything would be to incorporate in general.

So, what did I build? I worked on a project to automate hydroponic farming with a goal on open-source development. Using Arduino microcontrollers and a family of diverse sensors communicating on an RS485 serial network, controlling alerting and alert queuing based on critically, and directing the communications to a Raspberry Pi hosting the InfluxDB (for time-series data) and PostgreSQL databases, I mainly focused my initial work on the Arduino side to prove out the basics.

Several other ideas came to mind as I let my thoughts run freely later on. One of the things that the LLM suggested was dashboards to monitor time-series data for more ability to easily digest the data. I proposed a heatmap to plot the individual locations of plants on a scaled floorplan representation of the hydroponics facility. This heatmap would tag each plant (or group of plants) and change colors based on some condition, such as sensor alert (green for all is well, yellow for a minor imbalance, orange for something severe, and red for a critical problem).

Another thing, which actually was not an original idea of either myself or the LLM (though I hesitate to say the LLM has an “original idea”), was seeing some work done in the machine learning in computer vision space. Adapting some machine learning models to be trained on the appearance of plants to detect early warning signs of disease could very well be an incredible opportunity for ensuring an overall healthy crop and thus safeguarding aggregate yields.

Whether I continue down this path and work on the rest of the concept remains up for consideration. I’d love to hear your feedback, however, and encourage those who visit to share their thoughts and–if relevant–any experiences using AI or going through creative projects with Arduino, Raspberry Pi, hydroponics, etc.!

Happy coding and creating!

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Previous Post
Next Post