# Temperature sensing with badger2040w

**URL:** <https://forums.pimoroni.com/t/temperature-sensing-with-badger2040w/21685>\
**Category:** Support\
**Created:** [March 12, 2023, 12:10am UTC](https://forums.pimoroni.com/t/temperature-sensing-with-badger2040w/21685 "2023-03-12T00:10:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bjoern](https://avatars.discourse-cdn.com/v4/letter/b/46a35a/32.png) [@Bjoern](https://forums.pimoroni.com/u/Bjoern)\
**Post date:** [March 12, 2023, 12:10am UTC](https://forums.pimoroni.com/t/temperature-sensing-with-badger2040w/21685/1 "2023-03-12T00:10:42Z")

</div>

Hello,

Does anybody have some example code on extending badgerOS to display temperature (with a temperature module connected with stemma).

In other words, I’d like to keep the badger as it is, but add a function to display temperature (and other environmental properties captured by the stemma unit). (Ideally, an example that would fit straight into [pimoroni-pico/micropython/examples/badger2040w at main · pimoroni/pimoroni-pico · GitHub](https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/examples/badger2040w))

Happy to use any stemma unit available in the UK, as long as it has at least temperature - but anything else is a bonus!

---

<div class="post-metadata">

**Author:** ![Bjoern](https://avatars.discourse-cdn.com/v4/letter/b/46a35a/32.png) [@Bjoern](https://forums.pimoroni.com/u/Bjoern)\
**Post date:** [March 19, 2023, 5:25pm UTC](https://forums.pimoroni.com/t/temperature-sensing-with-badger2040w/21685/2 "2023-03-19T17:25:50Z")

</div>

I’ve added code to [GitHub - pimoroni/badger2040: Examples and firmware for Badger 2040 and Badger 2040 W](https://github.com/pimoroni/badger2040) via a PR here:  
[Adding temperature sensing (IEQ; indoor environmental quality) + roll-over for qr code by bjohas · Pull Request #8 · pimoroni/badger2040 · GitHub](https://github.com/pimoroni/badger2040/pull/8).

The actual code is here: [badger2040/ieq.py at main · OpenDevEd/badger2040 · GitHub](https://github.com/OpenDevEd/badger2040/blob/main/badger_os/examples/ieq.py)
