This is documentation of my latest and most exciting project so far
a smart agriculture system on raspberry pi running a linux image that was customized using the yocto project
this project was part of my final project for my embedded systems diploma, I was tasked to create a system with the following features
- system runs on raspberry pi using a custom linux image
- automatic watering when soil moisture falls below certain threshold,real-time monitoring of temprature humidity and soil moisture, rain sensor to immediately stop watering when rain starts
- a Qt based application for visualization and manual control of the system
- application for design patterns to ensure maintainability
Firstly
I decided that the correct order of things was to first be comfortable with the sensors first then start building the image, I was glad I did that because I realized I needed an external ADC since the raspberry pi does not have built in ADC, I then wrote the code using the pigpio python library since I was already proficient in it after my robotics experience
Secondly
I started laying out the dependencies and what features I need and what to leave and came to the following list
- SSH (openssh)
- splash screen (psplash)
- uart
- i2c
- ADC (ads112)
- wifi (wpa-supplicant)
- date and time(tzdata)
- pigpio
- screen support
- Qt
I then searched for each recipe on openembedded layer index to see which layer provides which recipe
next step was to determine what append files I need like the splash screen, the wifi, the date and time and the screen support
I included all the necessary layers and recipes and went on to the next step
Thirdly
This was by far the most tiring, frustrating and most confusing step, I am not exaggerating when I say that I spent weeks just researching errors and asking AI bots, not to mention missing dependencies, wrong do_compile functions, wrong source files paths, MAKE files that are over 50 lines and debugging that made me pull my hair, however I didn't feel more satisfied and happy like when I saw the splash screen rendered correctly, the ADC working, the I2C detecting the ADC and not to mention getting readings from the sensors
This part is still somewhat blurry and there are a lot of stuff I just pasted from stack overflow and other sites (AI was not helping in the slightest I think it actually made it more confusing) I want to come back to this post and provide screenshots and demos of the system working but that takes a lot of time and I still have trauma from the Quality Assurance errors and need a break
If you have any tips to help make the process of building systems easier please please tell me
Top comments (0)