Writing BMP085 sensor values to MySQL

Hello Everyone,

I wanted to request your assistance on reading values from a BMP085 barometric pressure sensor and writing the same into a MySQL database. I am a Arduino beginner and have been working on a few home monitoring projects. I wish to use the Arduini-MySQL connector library to write data into the MySQL server directly. Is there anybody who could assist me with this. I appreciate your help greatly.

IS there nobody who can help me with this?

I wish to use the Arduini-MySQL connector library

Got a link to this library?

This connector library enables us to write sketches from the Arduino directly into the MySQL server

http://drcharlesbell.blogspot.com/2013/04/introducing-mysql-connectorarduino_6.html

This connector library enables us to write sketches from the Arduino directly into the MySQL server

No, it doesn't. It allows you to write data from the Arduino to the MySQL server, not sketches.

So, do you have an Ethernet shield? Have you downloaded the library? Have you set up a MySQL server? Have you written any code to get data from the BMP085? Have you tried using the library to store the data?

If you need me to do it, send me your Arduino, your ethernet shield, your BMP085, and your computer. I'll send you a bill when I'm done. When you pay it, I'll return your stuff.

I have an Arduino, I have a Ethernet shield, I have setup the MySQL server. I have written a sketch to get values from the BMP085 sensor. I only need to know how to use this connector to write data from the Barometric pressure sensor into the MySQL server. Just the code for the same. I have two other sketches using which I'm collecting data from DHT22 sensor and TMP36 sensor and writing data into the MySQL server. I was unable to figure out how to do the same for the pressure sensor.

So, you have some code to read the pressure sensor, and some code to write other data to the database. But, you don't know how to combine, or share, them. Sounds like a real problem. I wish you the best of luck.

No Sir. I do know how to combine them. I am only stuck with figuring out how to write the data I am getting from the BMP085 into the MySQL server. If you could help me with the code for that, that is all I would need.

Post the code you have.

include "Wire.h"

include "Adafruit_BMP085.h"

Adafruit_BMP085 bmp;

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

void loop() { Serial.print("Temperature = "); Serial.print(bmp.readTemperature()); Serial.println(" *C");

Serial.print("Pressure = "); Serial.print(bmp.readPressure()); Serial.println(" Pa");

// Calculate altitude assuming 'standard' barometric // pressure of 1013.25 millibar = 101325 Pascal Serial.print("Altitude = "); Serial.print(bmp.readAltitude()); Serial.println(" meters");

Serial.println(); delay(500); }

I am just using an example program from the Adafruit website.