The pressure sensor BMP085

Hi everybody!

Recently I had a little time even to program my Arduino and now I’m here writing a new post. What I did was the library to use the sensor BMP085 that I bought for the weather station. It’s my first library so it is not so sophisticated, I am limited to rearrange the test code of SparkFun; everything works on IDE 1.0 and a version of Debian testing I’ve just upgraded from Ubuntu.

The requirements for use this library are:

  • Use an Arduino with I2C interface (The Arduino Ethernet I use have one)
  • A little trick in the code, when you call the library you must do like the code above:
void setup() {
  Wire.begin();  //be sure that this command is before the BMP085 init
  myBMP085.init();
  ...
 }

For any questions comment please!

You can download the library in the “My Arduino Libraries” page

Annunci

Il sensore di pressione BMP085

Eccomi qui!

Ultimamente ho avuto un po’ di tempo anche per programmare il mio Arduino ed eccomi qui a scrivere. Quello che ho realizzato è stato la libreria per poter utilizzare il sensore BMP085 che ho acquistato per la stazione meteo. E’ la mia prima libreria quindi non è poi così sofisticata, mi sono limitato a risistemare il codice di prova degli sparkfun, il tutto funziona sulla IDE 1.0 e un sistema Debian in versione testing che ho appena aggiornato da Ubuntu.

I requisiti per l’utilizzo sono pochi:

  • Avere un Arduino con interfaccia I2C (l’Arduino Ethernet che uso ne è provvisto)
  • Una piccola accortezza nel codice, quando richiamate la libreria occorre:
void setup() {
  ...
  Wire.begin();  //be sure that this command is before the BMP085 init
  myBMP085.init();
  ...
 }

Per domande commentate pure!

La libreria è disponibile nella pagina “My Arduino libraries”

Weather station with Arduino

Hi!

With this post I begin the weather station made with arduino.

Actually I bought an Arduino Ethernet (it contains an ethernet port and a microSD slot for record data), a temperature and humidity sensor and a pressure sensor.

To use Arduino I use Ubuntu 11.10 and the Arduino IDE 1.0 (you can find on the Arduino webpage), both at 64bit. To program the Arduino Ethernet I use the USB FTDI cable and with this last version of Arduino IDE you have not to burn a new bootloader.

At the moment I only tested the humidity and temperature sensor RHT03 (also called DHT22) with this library avaible at this link. But for use this library with last version of Arduino IDE I have to change the code in the DHT22.cpp file:

43: #include "DHT22.h"
44: #include "pins_arduino.h"
45:
46: extern "C" {
47:   #include "WConstants.h"
48:   #include <avr/io.h>
49:   #include <avr/interrupt.h>
50:   #include <avr/pgmspace.h>
51:   }

to:

43: #include "DHT22.h"
44: #include "pins_arduino.h"
45: #include "Arduino.h"
46:
47: extern "C" {
48:   #include <avr/io.h>
49:   #include <avr/interrupt.h>
50:   #include <avr/pgmspace.h>
51:   }

With this change everything works!

Bye! Stay tuned!