Project tutorial
Arduino Servo Barometer with BMP085 Sensor

Arduino Servo Barometer with BMP085 Sensor © GPL3+

An Arduino electromechanical barometer.

  • 1,059 views
  • 2 comments
  • 3 respects

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

All About Servo Motors and Servo Motor Tester

Project tutorial by RoboCircuits

  • 2,596 views
  • 1 comment
  • 8 respects

Servo Motor and Water Sensor

Project tutorial by Nicolo_Brizio

  • 1,731 views
  • 1 comment
  • 4 respects

Barometer with Analog Scale (Ammeter)

Project tutorial by Mirko Pavleski

  • 1,478 views
  • 0 comments
  • 7 respects

Matrix Orbital EVE2 TFT, Servo and an AMS Magnetic Sensor

Project showcase by MatrixOrbital

  • 887 views
  • 0 comments
  • 5 respects
Add projectSign up / Login