BME280 sensor.


Closed Thread
Results 1 to 20 of 20

Thread: BME280 sensor.

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: BME280 sensor.

    Out of curiosity, have you tried the PBP code you posted with negative temperature values?
    sorry no, i never actually used pbp for these sensors after discovering the real potential of esp chips


    if the upper word was set appropriately here maybe that would help , adc_t might need similar treatment but the calculation should be
    then ok ,i think?

    Code:
        T1.Byte0 = IIC_RX[0]                            ' Calibration data into Unsigned Word
           T1.Byte1 = IIC_RX[1]
        T2.Byte0 = IIC_RX[2]                            ' Calibration data into Signed Long
           T2.Byte1 = IIC_RX[3]
        if  IIC_RX[3].7 then 
          T2.Byte3=255
          T2.Byte4=255
        else
          T2.Byte3=0
          T2.Byte4=0
        endif
        T3.Byte0 = IIC_RX[4]                            ' Calibration data into Signed Long
           T3.Byte1 = IIC_RX[5]
        if  IIC_RX[5].7 then 
          T3.Byte3=255
         T3.Byte4=255
       else
          T3.Byte3=0
          T3.Byte4=0
       endif
    Warning I'm not a teacher

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: BME280 sensor.

    the calculation should be
    then ok ,i think?
    nah, pbp needs a signed shift right command too. too hard me thinks. pic chip in bin, esp wins
    Warning I'm not a teacher

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: BME280 sensor.

    For anyone who are still interested in using this sensor with PBP I've posted my code as an example in the Wiki:
    http://www.picbasic.co.uk/forum/cont...BME280-Example

    If any questions or suggestions should pop up I suggest we keep them in this thread.

    /Henrik.

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: BME280 sensor.

    excellent work henrik, way better than my fp attempt [nearly 10k in size] to get a result.
    i confirm it gets same results temp and pressure wise as arduino calcs for same input data
    not tried hum yet
    Warning I'm not a teacher

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: BME280 sensor.

    henrik
    i made a little change

    used this style
    IF P2.15 = 1 THEN
    p2.highWORD = 65535
    ENDIF

    for all the casts to long , it saves a worthwhile bit of code space

    can't test humidity on pic yet , just discovered the dishonest ebayer has sold me 4 out of 5 bmp280's in lieu of bme280 boards.
    i can't tell them apart with naked eye, must admit the temp seems more accurate in absolute terms for the bmp boards there is nearly a 3 deg difference between bme and bmp readings in the same aircon'ed room and thats closer to the mercury bulb . are cheap ebay things always a bit dodgy?
    Warning I'm not a teacher

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: BME280 sensor.

    "are cheap ebay things always a bit dodgy?" not in my experience, most seem surprisingly interested in protecting their feedback score. Try email seller thro ebay and explain the mistake.
    George

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: BME280 sensor.

    Try email seller thro ebay and explain the mistake.
    did that , even though i have had the boards for 2 months or more , got a full refund within a couple of hours.
    quite surprised in a good way
    Warning I'm not a teacher

Similar Threads

  1. MQ-7 Sensor
    By chipmaker in forum General
    Replies: 3
    Last Post: - 9th June 2017, 00:05
  2. Speed Sensor Anyone???
    By Ramius in forum General
    Replies: 19
    Last Post: - 18th May 2012, 04:37
  3. Pir Sensor
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th May 2009, 16:34
  4. Accelerometer Sensor
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 27th August 2008, 13:26
  5. Replies: 6
    Last Post: - 18th January 2008, 08:17

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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