Project tutorial
Arduino Servo Barometer with BMP085 Sensor

Arduino Servo Barometer with BMP085 Sensor © GPL3+

An Arduino electromechanical barometer.

  • 506 views
  • 2 comments
  • 1 respect

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

Code

codeArduino
#include <Wire.h>
#include <Servo.h>
#include <Adafruit_BMP085.h>

Adafruit_BMP085 mySensor;  // create sensor object called mySensor

float pressure;
Servo barServo;



void setup() 
{

     barServo.attach(9);
     mySensor.begin();   //initialize mySensor
    
}

void loop()
{

pressure=mySensor.readPressure(); //Read Pressure

if (pressure < 90135) pressure = 90135;
else if (pressure > 95653) pressure = 95653;

int press = 2450 - (int) (( pressure - 90135) / 3.06);
barServo.writeMicroseconds(press);
delay(50);
}

Schematics

schematic
Schematic s6sckpkvc8

Comments

Similar projects you might like

Matrix Orbital EVE2 TFT, Servo and an AMS Magnetic Sensor

Project showcase by MatrixOrbital

  • 486 views
  • 0 comments
  • 4 respects

Obstacles Avoiding Robot With Servo Motor

Project tutorial by Sora JY

  • 6,898 views
  • 3 comments
  • 21 respects

Bluetooth Controlled Servo

Project tutorial by JANAK13

  • 5,405 views
  • 16 comments
  • 31 respects

Servo Motor Using Arduino & PCA9685 16 Chanel Module

Project tutorial by Jithin Sanal

  • 29,113 views
  • 2 comments
  • 16 respects

Soil Moisture Sensor With LCD Display

Project tutorial by Patel Darshil

  • 19,375 views
  • 4 comments
  • 37 respects
Add projectSign up / Login