• I am using huzzah32 board with bme680 on SPI pins

    I got faulty measurement every time.
    My code is :

    var spi = new SPI();
    spi.setup({miso : 19 , mosi : 18, sck: 5});
    var bme = require("BME680").connectSPI(spi, 15);

    setInterval(function() {
    var data = bme.get_sensor_data();
    console.log(JSON.stringify(data,null,2))­;
    bme.perform_measurement();
    }, 1000);

    Output: {
    "new": true,
    "temperature": 102.03690927114,
    "pressure": -148.08,
    "humidity": 0,
    "gas_resistance": 12858837.98880876228
    }

    using I2c its working fine . but i cant use I2c because i attach different sensor with it.

    I suck this point :(

  • Have you set CSB according to spi?

  • I set pin 15 as a CSB

  • Try setting the baud/speed - use something slow to begin with.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Problem in connecting Huzzah32 with bme680 on SPI pins

Posted by Avatar for Saurabh @Saurabh

Actions