Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Teensy 2.0 - I2C not connecting with BMPO85

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    4

    Teensy 2.0 - I2C not connecting with BMPO85

    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/viewe...MDMzZTZj&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...


    Click image for larger version. 

Name:	2013-03-01 21.07.49.jpg 
Views:	206 
Size:	163.4 KB 
ID:	293

    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 by fré; 03-01-2013 at 08:34 PM.

  2. #2
    Is this board 5V tolerant? I think there a several BMP85 boards that are limited to 3.3V

    And: There are several broken examples for the BMP085 floating around, I had lots and lots of trouble until I found a working sketch.

  3. #3
    Junior Member
    Join Date
    Feb 2013
    Posts
    4
    Quote Originally Posted by ausserirdischegesund View Post
    Is this board 5V tolerant? I think there a several BMP85 boards that are limited to 3.3V

    And: There are several broken examples for the BMP085 floating around, I had lots and lots of trouble until I found a working sketch.
    Both boards are supposed to as announced. Bmp-board contains connections for 5V & 3.3V and something that looks like a voltage regulator... So I might expect it to be.
    No idea how resistant it could/might/will/shall be to voltage fluctuations though... Is the VoltReg not supposed to take this into account?
    Beside that, for both Sda and scl, pullups have been installed too...
    Last edited by fré; 03-01-2013 at 11:23 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •