Hot!MPLAB I2C Code for Barometric pressure sensor GY-B11 280

Author
Chipped
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2018/06/07 06:21:31
  • Location: 0
  • Status: offline
2018/06/13 03:45:54 (permalink)
0

MPLAB I2C Code for Barometric pressure sensor GY-B11 280

Hello,
Looking for MPLAB I2C driver code for a BMP280 pressure sensor... any pointers as to where I may find some code I can work with ? Tks.
#1

6 Replies Related Threads

    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2611
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: online
    Re: MPLAB I2C Code for Barometric pressure sensor GY-B11 280 2018/06/13 03:50:06 (permalink)
    0
    Datasheet has the address and registers.
     
    You just need some i2c functions.  Search the forums.
    It's then just a matter of i2c_gets(int Device, int Address, void *Buffer, int Len);
    post edited by Gort2015 - 2018/06/13 03:53:06

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #2
    rodims
    Super Member
    • Total Posts : 1292
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: MPLAB I2C Code for Barometric pressure sensor GY-B11 280 2018/06/13 05:43:24 (permalink)
    +1 (1)
    Looking for MPLAB I2C driver code for a BMP280 pressure sensor... any pointers as to where I may find some code I can work with ?

     
    You are not very specific about what your problem is. 
    Sounds as if your are looking for a full fledged solution including barometer calculations, which you won't find here.
    Better google for BMP280 and Arduino then and possibly convert that to PIC.
     
    Do you have experience with i2c ?
    Do you already have i2c functions ?
    Did you test/try anything so far ?
    Did you already use your i2c functions successfully with another i2c device ?
     
    If you have basic knowledge, but are still on the level of getting i2c communication to work with your PIC, then you may find some information in this thread (starts with SPI but later continues with i2c)
     
    https://www.microchip.com/forums/m964883.aspx
     
    #3
    Chipped
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2018/06/07 06:21:31
    • Location: 0
    • Status: offline
    Re: MPLAB I2C Code for Barometric pressure sensor GY-B11 280 2018/06/13 06:53:59 (permalink)
    0
    Thank you Gort2105 for the reply.
    I do have working IC2 functions for init, read write etcand data sheet with device and reg addresses.
    It is  more the bit in the middle e.g.  code for handling conversion of data read from the sensor to actual to Pressure / Temp/ Relative Humidity  values  that can then be displayed on an LCD.(Have working LCD code). Tks
    #4
    Chipped
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2018/06/07 06:21:31
    • Location: 0
    • Status: offline
    Re: MPLAB I2C Code for Barometric pressure sensor GY-B11 280 2018/06/13 06:55:57 (permalink)
    0
    Hi Rodims, Its a yes to all your questions! It more the conversion calculations I am interested in.
     
     
    #5
    rodims
    Super Member
    • Total Posts : 1292
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: MPLAB I2C Code for Barometric pressure sensor GY-B11 280 2018/06/13 07:11:02 (permalink)
    +2 (2)
    The manual contains information and code about compensation, but in general you will need to google.
    https://github.com/BoschSensortec/BMP280_driver/blob/master/README.md
     
    The BMP280 has been used in many projects.
    Adafruit also has a library somewhere and some background information
    https://learn.adafruit.com/calibrating-sensors/why-calibrate
     
    #6
    Chipped
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2018/06/07 06:21:31
    • Location: 0
    • Status: offline
    Re: MPLAB I2C Code for Barometric pressure sensor GY-B11 280 2018/06/14 03:39:13 (permalink)
    0
    Thanks Rodims for  the useful links.
    #7
    Jump to:
    © 2018 APG vNext Commercial Version 4.5