From Arduino IDE to Libraries: The Tools We Used to Build Our Project

 The Software Side: How We Coded the Oil Purity Tester ๐Ÿ’ป


In my last post, I showed you the hardware of our project "PureDrop"—the sensors, the wires, and the final box. But honestly, the hardware is only half the battle. The real headache (and fun) was making all those parts talk to each other using code.
I wanted to share the specific tools and software we used, just in case any of you are planning a similar IoT project and don't know where to start.

1. Where We Wrote the Code: Arduino IDE


The Arduino IDE interface where we wrote and compiled our code.

We stuck to the basics here. We used the Arduino IDE to write and upload our code. Even though there are fancy pro tools out there, Arduino IDE is just the easiest for students to use. It’s simple: you type the code, hit the arrow button, and it uploads.

2. Setting up the ESP32

Since we used an ESP32 board (which is more powerful than a normal Arduino Uno), it didn't work straight out of the box. We had to install the "ESP32 Board Package" inside the IDE manager. If you ever use an ESP32, don't forget this step, or your computer won't even recognize the board!

Installing the essential libraries using the Library Manager


3. The "Lifesaver" Libraries

To be honest, writing raw code for sensors from scratch is really difficult and takes forever. So, we used Libraries. Think of these as "shortcuts" or pre-written code that other people have made to make our lives easier.

Here are the main ones we used:

  • OneWire & DallasTemperature: We needed these for the waterproof temperature probe (DS18B20). Without these, reading the temperature data would have required some crazy complex math. These libraries just gave us a simple number in Celsius.

  • OLED Display Library: We used this to display the text on that small blue screen. Instead of coding every single pixel, this library let us just type commands like "display.print" to show the output.

  • TCS3200 Code: For the color sensor, we didn't use a specific library, but we used a standard logic script that measures the frequency of Red, Green, and Blue light. This helped us figure out if the oil was dark (bad) or clear (good).

Final Thoughts

The biggest lesson I learned from my previous work is that you don't need to write every single line of code yourself. Smart engineering is about finding the right tools and libraries that already exist and putting them together to solve your problem.

Comments

Popular posts from this blog

The ECE Lab guide

6 Free Websites Every ECE Student Needs to Know

Beginning of a Journey