Stepping Forward as an IoT AgroTech Engineer: Building a Prototype Pipeline for Crop Data Collection

Cover Image for Stepping Forward as an IoT AgroTech Engineer: Building a Prototype Pipeline for Crop Data Collection

Why I Built This

I created this small pipeline simulator for several reasons:

  1. Skill Development: I wanted to understand how IoT devices work in smart farming, similar to the systems used by companies like IOcrops. Building this project helped me gain practical experience with technologies relevant to IoT hardware QA engineering.

  2. Team Project Preparation: I am also working on a team project that involves IoT devices and Arduino. This experience serves as a small but important step toward expanding my knowledge and practical skills for both individual and collaborative work.

  3. Career Preparation: I needed a way to demonstrate my ability to work with Linux and C/C++, which are essential skills in the IoT field. By including this project in my portfolio, I was able to pass the resume screening for a job application. This experience showed me the value of hands-on projects when applying for technical positions.

  4. Personal Vision: My broader motivation is to become a tech-savvy farmer who can establish a farm where technology and nature work together in harmony—a vision sometimes called “solarpunk.” I believe that by understanding and applying these technologies, it’s possible to create more sustainable and abundant agricultural systems.

For my KNOU peers and others considering a tech career: building and sharing your own projects can be a strong way to showcase your abilities, even if you don’t have formal work experience yet.


What the Project Does

  • It simulates a smart farm environment.

  • A C++ program generates fake temperature and humidity data, similar to what real sensors would do.

  • The data is made available through a small web server so it can be viewed in a browser.

  • There’s a basic dashboard that updates with the latest sensor readings.


How It Works

  • I used Multipass to set up a Linux environment on my MacBook Pro (M2). Many IoT systems use Linux, and Multipass allows me to run a full Ubuntu VM efficiently, without needing to dual-boot or risk compatibility issues with native Linux installs on Apple Silicon. Multipass can launch a fresh Ubuntu instance in about 1 minute, compared to setting up Ubuntu as a dual boot, which typically takes 20–30 minutes (including partitioning, installation, and configuration). This saves significant time and avoids potential risks to my main system.

  • The C++ code simulates sensors and writes data to a file.

  • CivetWeb, a lightweight web server library, reads this data and serves it to a web page. CivetWeb’s library size is under 1 MB, while alternatives like Apache or Nginx require dozens to hundreds of MBs and much more memory at runtime. CivetWeb can be embedded directly in C/C++ applications with just a few lines of code, and can handle hundreds of simultaneous connections on modest hardware.

  • Simple scripts help start and stop the system easily, reducing setup time to under 10 seconds.


Why Not Just C? Why C++?

While C is widely used in embedded systems for its low-level control, I chose C++ because it offers all the capabilities of C plus additional features that are especially useful for IoT projects:

  • Object-Oriented Programming: C++ supports classes, inheritance, and templates, making code more modular, reusable, and maintainable.

  • Abstraction and Safety: C++ provides better type safety and abstraction, reducing bugs and making complex systems easier to manage.

  • Standard Library and Tools: The C++ standard library offers many useful data structures and algorithms, speeding up development.

  • Portability: C++ code is easily portable across different hardware platforms and microcontrollers.

  • Performance: C++ allows for efficient, high-performance code that is still close to the hardware when needed.

For IoT, where both efficiency and maintainability matter, C++ is often the best choice.


Why Multipass for macOS?

Multipass is the most practical way to run Linux on a MacBook Pro M2 for several reasons:

  • Native Apple Silicon Support: Multipass supports Apple Silicon, while other VM tools like VirtualBox do not, or require complex workarounds.

  • Lightweight and Fast: Multipass can launch Ubuntu VMs in about 1 minute. In contrast, setting up a dual-boot or using Docker for similar purposes can take 20–30 minutes or more, not counting troubleshooting time.

  • Easy Integration: It allows seamless file sharing, command aliasing, and directory mapping between macOS and the Linux VM, making development smoother.

  • No Risk to Host OS: Running Linux in Multipass avoids the risks and instability of dual-booting or replacing macOS on new hardware.

  • Cloud-Like Dev Experience: Multipass makes it easy to prototype cloud deployments locally, which is valuable for IoT and DevOps workflows.


Why CivetWeb Over Other Libraries?

I selected CivetWeb for this project because:

  • Lightweight and Fast: CivetWeb’s library size is less than 1 MB, compared to Apache or Nginx, which can be 50–100 MB or more. CivetWeb can handle hundreds of simultaneous connections even on devices with as little as 128 MB RAM.

  • Easy to Embed: It can be included directly in C/C++ applications, unlike larger servers that require separate processes or complex configuration.

  • Permissive License: CivetWeb uses the MIT license, allowing for flexible use in both open-source and commercial projects.

  • Rich Feature Set: It supports HTTP/HTTPS, CGI, SSL, and can be used as both a library and a standalone server.

  • Customizable and Modular: Features can be enabled or disabled as needed, keeping the footprint small and efficient.

  • Better Fit Than Alternatives: Alternatives like Apache or Nginx are too heavy for IoT. Mongoose, while similar, changed to a more restrictive GPL license, making CivetWeb more suitable for open projects.


Where This Could Be Used

This approach is similar to what’s used in:

  • Greenhouses for monitoring crops

  • Remote management of farm environments

  • Testing new sensors or devices before they are used in the field

Companies like IOcrops use similar pipelines to collect and analyze data for smart farming.


Who This Is For

  • Students at KNOU who want to see a practical example of IoT and C++ in action

  • Anyone interested in how technology can be applied to agriculture

  • People considering a role in IoT hardware QA or related fields


Closing Thoughts

This project is a basic demonstration, but it covers the main ideas behind IoT data collection and visualization. It’s a starting point for learning how software and hardware work together in modern agriculture. If you’re interested in these topics, you can look at the code and try running it yourself.

What I’ve learned through this journey is that AI plays a significant role in accelerating how we learn. I’ve found that using AI tools as much as possible—and as thoroughly as possible—helps me learn faster, but it’s important to approach them with a critical mindset. I often ask myself questions like, “Why is Multipass the best option for now? Are there other alternatives I should consider?” This habit has helped me develop a more thoughtful and in-depth approach to learning and problem-solving.

Looking ahead, I’m considering getting a Linux laptop to complement my current MacBook Pro M2. While dual-booting Linux on the Mac is possible, I’m still weighing which setup would best support my growth as an IoT AgroTech engineer. I’m interested in options like the Framework 13", which supports Linux well and aligns with my interest in sustainability. Having a dedicated Linux laptop would push me to manage the kernel and operating system directly, which I believe is a good strategy for intentional learning and technical growth. I’m curious what others think about this—whether a Linux laptop or dual-booting is better for building knowledge and skills in this field.

I also realize that building a pipeline is just one step. I want to learn how to plan and execute comprehensive QA tests for IoT devices and understand the full cycle of QA activities. This will give me more practical, hands-on skills that are needed in real-world projects.

I plan to keep deepening my knowledge of C as well. Even though AI is advancing rapidly and changing many parts of the digital world, hardware integration—like sensor handling and configuring devices—still requires manual effort and understanding. AI tools like Replit may be changing the landscape for front-end developers, but the hardware side still relies on human expertise and careful work. I’m interested to hear how AI chatbots would respond to this perspective.

Overall, this journey—combining my interests in IoT, agriculture, and technology—has been rewarding and full of new opportunities. I’m enjoying the process and looking forward to where it leads next.