From Arduino IDE to Libraries: The Tools We Used to Build Our Project
The Software Side: How We Coded the Oil Purity Tester ๐ป
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).


Comments
Post a Comment