sensor-experiments

Introduction

This experiment demonstrates how to monitor oxygen levels in an aquarium using an oxygen sensor.

Components Needed

No Ads Available.

Circuit Setup

  1. Connect the VCC pin of the oxygen sensor to 5V on the Arduino.
  2. Connect the sensor's output pin to an analog input pin (e.g., A0) on the Arduino.

The sensor will monitor the oxygen levels in the aquarium and send the data to the Arduino.

Code for Oxygen Sensor

Upload the following code to your Arduino to measure oxygen levels:


const int oxygenPin = A0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int oxygenLevel = analogRead(oxygenPin);
  Serial.print("Oxygen Level: ");
  Serial.println(oxygenLevel);
  delay(1000);
}
            

Explanation

The oxygen sensor detects the dissolved oxygen level in the aquarium, which is read by the Arduino and displayed on the Serial Monitor.

Troubleshooting

Contact Us

If you have any questions or inquiries, feel free to reach out to us at Microautomation.no@icloud.com .

Follow our Socials for the newest updates!