I recently got a BMP085 from Drotek, trying to connect it now with my new Teensy 2 (ordered via Ada 2 weeks ago).
Sadly, I don't get aaaaany output, not even with basic code & simple examples like
http://https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B3ASxBYiXsrDYmYyNjVmZmUtZDc2My00MzNjLTkxYzMtNTUyMDBkMDMzZTZj&hl=fr
Just wondering whether the chip got fried or what I might be doing wrong... Coding with Arduino 1.0.3 & latest teensyduino.
Issues with libraries? With I2C-pins? (aaaaaaaaarghhh)
Connect SCL with D0 (pin5), SDA with D1 (pin6) ... 5V running of VCC near the USB-plug.
** Code going FUBAR at dps.init...
Sadly, I don't get aaaaany output, not even with basic code & simple examples like
http://https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B3ASxBYiXsrDYmYyNjVmZmUtZDc2My00MzNjLTkxYzMtNTUyMDBkMDMzZTZj&hl=fr
Just wondering whether the chip got fried or what I might be doing wrong... Coding with Arduino 1.0.3 & latest teensyduino.
Issues with libraries? With I2C-pins? (aaaaaaaaarghhh)
Connect SCL with D0 (pin5), SDA with D1 (pin6) ... 5V running of VCC near the USB-plug.
** Code going FUBAR at dps.init...
Code:
#include <Wire.h>
#include <BMP085.h>
const int Speed = 19200;
const int buzzPin = 4;
char STRING[40]="";
int32_t Pressure = 999999;
int32_t Altitude = 99999;
int pitch=400;
int count=12;
BMP085 dps = BMP085();
//=========================================================================
void bleep(int toon=0) {
tone(buzzPin,pitch,100);
if (toon > 0) { delay(200); tone(buzzPin,pitch+150,150); }
}
//=========================================================================
// the setup() method runs once, when the sketch starts
void setup() {
delay(5000);
bleep();
Wire.begin();
Serial.begin(28800);
Serial.println("Starting DPS\n");
delay(1000);
dps.init();
delay(1500);
bleep(1);
Serial.println("DPS Started.");
}
//================================================================================
void loop() {
dps.getPressure(&Pressure); delay(200);
dps.getAltitude(&Altitude);
sprintf(STRING,"%lu,%lu,%lu,%u,%u,",Pressure,Altitude);
Serial.println(STRING);
tone(buzzPin,pitch*count++/4-200,100);
delay(200);
}
Last edited: