# sensor-bme280 and Adafruit\_Sensor.h

**URL:** <https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794>\
**Category:** Hardware Interfacing Questions\
**Created:** [February 10, 2024, 9:56pm UTC](https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794 "2024-02-10T21:56:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alekswhite](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@alekswhite](https://forum.xod.io/u/alekswhite)\
**Post date:** [February 10, 2024, 9:56pm UTC](https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794/1 "2024-02-10T21:56:55Z")

</div>

## I use the library emiliosancheza/bme280-sensor/sensor-bme280. When I run the project I get an error

## Generating C++ code for simulation… Building… /ws/sketchbook/f067fc25bccdee58bc4d550b70da0bbb4673edc9e916315127e31c9e4e6aac9c/sketch/sketch.ino:980:10: fatal error: ‘Adafruit\_Sensor.h’ file not found

The file was found on GitHub adafruit/Adafruit\_Sensor.  
How to get rid of the error?

---

<div class="post-metadata">

**Author:** ![wayland](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/wayland/32/1590_2.png) [@wayland](https://forum.xod.io/u/wayland)\
**Post date:** [February 11, 2024, 6:38pm UTC](https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794/2 "2024-02-11T18:38:39Z")

</div>

While XOD allows you to simulate microcontroller boards, it doesn’t have the capability to simulate additional hardware devices such as your bme280 sensor.

---

<div class="post-metadata">

**Author:** ![alekswhite](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@alekswhite](https://forum.xod.io/u/alekswhite)\
**Post date:** [February 11, 2024, 7:28pm UTC](https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794/3 "2024-02-11T19:28:20Z")

</div>

Thanks for the answer.  
But how to connect an additional library?  
Where to put the files  
Adafruit\_Sensor.cpp  
Adafruit\_Sensor.h

Where is it written how to collect the HOD code?  
I’m just getting started with the platform.

---

<div class="post-metadata">

**Author:** ![wayland](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/wayland/32/1590_2.png) [@wayland](https://forum.xod.io/u/wayland)\
**Post date:** [February 11, 2024, 10:42pm UTC](https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794/4 "2024-02-11T22:42:15Z")

</div>

Instructions for using libraries can be found here:  
[https://xod.io/docs/guide/using-libraries/](https://xod.io/docs/guide/using-libraries/)

Adafruit\_Sensor.cpp and Adafruit\_Sensor.h should have been installed automatically when you added the **emiliosancheza/bme280-sensor** library to the XOD IDE. The simulator cannot “see” these files (that’s why you received an error), but they should be present if the library installation was successful.

Try uploading the patch called **example-test-sensor-bme280** to your microcontroller board. Remember to tick the checkbox “Debug after upload” so that you can see the sensor readings in the watch nodes.

If you’re new to XOD I’d recommend working through the built-in tutorials. Another useful resource for self-paced learning is:  
[Rapid Prototyping](https://static1.squarespace.com/static/584d41b3f5e2310b396cd953/t/64448f11c6ed9c0cbde4a8e7/1682214679998/RapidProto-US-FinalDraft_s.pdf)

---

<div class="post-metadata">

**Author:** ![alekswhite](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@alekswhite](https://forum.xod.io/u/alekswhite)\
**Post date:** [February 13, 2024, 7:15pm UTC](https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794/5 "2024-02-13T19:15:28Z")

</div>

Thanks for the answers.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [March 14, 2024, 7:15pm UTC](https://forum.xod.io/t/sensor-bme280-and-adafruit-sensor-h/6794/6 "2024-03-14T19:15:34Z")

</div>

Closed on March 14, 2024, 7:15pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
