Bosch Sensortec Community

    BME680 : IAQ with Arduino UNO

    Highlighted
    New Poster

    BME680 : IAQ with Arduino UNO

    I used Arduino UNO to collect environment  data with DFrobot-BME680,

    It is work with the example code without IAQ,

    but when I want to use IAQ code to see the results, these errors coming:

     

     

    Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Uno"











    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c: In function 'bme680_bsec_update_subscription':
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:122:46: error: 'BSEC_OUTPUT_IAQ' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_RAW_GAS'?
    requested_virtual_sensors[0].sensor_id = BSEC_OUTPUT_IAQ;
    ^~~~~~~~~~~~~~~
    BSEC_OUTPUT_RAW_GAS
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:122:46: note: each undeclared identifier is reported only once for each function it appears in
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:136:46: error: 'BSEC_OUTPUT_STATIC_IAQ' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_IAQ'?
    requested_virtual_sensors[7].sensor_id = BSEC_OUTPUT_STATIC_IAQ;
    ^~~~~~~~~~~~~~~~~~~~~~
    BSEC_OUTPUT_IAQ
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c: At top level:
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:159:20: error: conflicting types for 'bsec_iot_init'
    return_values_init bsec_iot_init(float sample_rate, float temperature_offset, bme680_com_fptr_t bus_write,
    ^~~~~~~~~~~~~
    In file included from C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:81:0:
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.h:140:20: note: previous declaration of 'bsec_iot_init' was here
    return_values_init bsec_iot_init(float sample_rate, float temperature_offset, bme680_com_fptr_t bus_write, bme680_com_fptr_t bus_read,
    ^~~~~~~~~~~~~
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c: In function 'bsec_iot_init':
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:165:24: error: 'BSEC_MAX_STATE_BLOB_SIZE' undeclared (first use in this function); did you mean 'BSEC_MAX_PROPERTY_BLOB_SIZE'?
    uint8_t bsec_state[BSEC_MAX_STATE_BLOB_SIZE] = {0};
    ^~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_MAX_PROPERTY_BLOB_SIZE
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:167:25: error: 'BSEC_MAX_WORKBUFFER_SIZE' undeclared (first use in this function); did you mean 'BSEC_MAX_STATE_BLOB_SIZE'?
    uint8_t work_buffer[BSEC_MAX_WORKBUFFER_SIZE] = {0};
    ^~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_MAX_STATE_BLOB_SIZE
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c: In function 'bme680_bsec_process_data':
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:424:22: error: 'BSEC_OUTPUT_IAQ' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_RAW_GAS'?
    case BSEC_OUTPUT_IAQ:
    ^~~~~~~~~~~~~~~
    BSEC_OUTPUT_RAW_GAS
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:428:22: error: 'BSEC_OUTPUT_STATIC_IAQ' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_IAQ'?
    case BSEC_OUTPUT_STATIC_IAQ:
    ^~~~~~~~~~~~~~~~~~~~~~
    BSEC_OUTPUT_IAQ
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:432:22: error: 'BSEC_OUTPUT_CO2_EQUIVALENT' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_IAQ_ESTIMATE'?
    case BSEC_OUTPUT_CO2_EQUIVALENT:
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_OUTPUT_IAQ_ESTIMATE
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:436:22: error: 'BSEC_OUTPUT_BREATH_VOC_EQUIVALENT' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_CO2_EQUIVALENT'?
    case BSEC_OUTPUT_BREATH_VOC_EQUIVALENT:
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_OUTPUT_CO2_EQUIVALENT
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:458:22: error: 'BSEC_OUTPUT_COMPENSATED_GAS' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_RAW_GAS'?
    case BSEC_OUTPUT_COMPENSATED_GAS:
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_OUTPUT_RAW_GAS
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:462:22: error: 'BSEC_OUTPUT_GAS_PERCENTAGE' undeclared (first use in this function); did you mean 'BSEC_OUTPUT_RAW_PRESSURE'?
    case BSEC_OUTPUT_GAS_PERCENTAGE:
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_OUTPUT_RAW_PRESSURE
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:475:9: error: too many arguments to function 'output_ready'
    output_ready(timestamp, iaq, iaq_accuracy, temp, humidity, raw_pressure, raw_temp,
    ^~~~~~~~~~~~
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c: At top level:
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:491:6: error: conflicting types for 'bsec_iot_loop'
    void bsec_iot_loop(sleep_fct sleep, get_timestamp_us_fct get_timestamp_us, output_ready_fct output_ready,
    ^~~~~~~~~~~~~
    In file included from C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:81:0:
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.h:154:8: note: previous declaration of 'bsec_iot_loop' was here
    int8_t bsec_iot_loop(sleep_fct sleep, get_timestamp_us_fct get_timestamp_us, output_ready_fct output_ready);
    ^~~~~~~~~~~~~
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c: In function 'bsec_iot_loop':
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:508:24: error: 'BSEC_MAX_STATE_BLOB_SIZE' undeclared (first use in this function); did you mean 'BSEC_MAX_PROPERTY_BLOB_SIZE'?
    uint8_t bsec_state[BSEC_MAX_STATE_BLOB_SIZE];
    ^~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_MAX_PROPERTY_BLOB_SIZE
    C:\Users\mehrd\Documents\Arduino\libraries\DFRobot_BME680-master\bsec_integration.c:509:25: error: 'BSEC_MAX_WORKBUFFER_SIZE' undeclared (first use in this function); did you mean 'BSEC_MAX_STATE_BLOB_SIZE'?
    uint8_t work_buffer[BSEC_MAX_WORKBUFFER_SIZE];
    ^~~~~~~~~~~~~~~~~~~~~~~~
    BSEC_MAX_STATE_BLOB_SIZE
    exit status 1
    Error compiling for board Arduino Uno.


    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    I used to change the parameters for platform.txt and installed different libraries

    but still not working

    1 REPLY 1
    Highlighted
    Established Member

    Re: BME680 : IAQ with Arduino UNO

    Hello, 

     

    Yes, if you are using old version BSEC, there is no the parameter. 

    If you downloaded DFRobot github, that was 3 years old code, so that you need to use latest bsec. 

    Please download below url, and migrate it. 

    https://www.bosch-sensortec.com/software-tools/software/bsec/

    There is arduino example as well. 

    Thanks, 

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist