# Thermal Camera Problem

**URL:** https://forums.pimoroni.com/t/thermal-camera-problem/11042
**Category:** Support
**Created:** [July 21, 2019, 1:22pm UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042 "2019-07-21T13:22:10Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![RichS](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@RichS](https://forums.pimoroni.com/u/RichS)
#### Post date: [July 21, 2019, 1:22pm UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/1 "2019-07-21T13:22:10Z")

</div>

Hi everyone,  
I bought a MLX90640 Thermal Camera Breakout – Wide angle (110°) which I am trying to use on a Rasberry Pi 4 via the breakout garden. On a fresh version or Raspbian (followed by an update), I have followed the instructions from github but when I try one of the examples I get:  
bcm2835\_init: gpio mmap failed: cannot allocate memory segmentation fault.  
I did then lower the IMAGE\_SCALE but that did not help.  
Previously I tried it with BME680 in, and that sensor worked fine but I got the same error above for the thermal camera.

---

<div class="post-metadata">

### Author: ![RichS](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@RichS](https://forums.pimoroni.com/u/RichS)
#### Post date: [July 21, 2019, 1:53pm UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/2 "2019-07-21T13:53:48Z")

</div>

More information, its actually returning an error when I connect it to the breakout garden, is it a hardware problem?

---

<div class="post-metadata">

### Author: ![GordonTGopher](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@GordonTGopher](https://forums.pimoroni.com/u/GordonTGopher)
#### Post date: [July 22, 2019, 7:25am UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/3 "2019-07-22T07:25:18Z")

</div>

You say it is returning an error when you connect it, are you plugging it in whilst the Pi is running? If so, this may be causing the issue. I don’t believe the breakouts are ‘hot plugable’ you need to power down the Pi before you connect the devices.

---

<div class="post-metadata">

### Author: ![monglet](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/monglet/32/1113_2.png) [@monglet](https://forums.pimoroni.com/u/monglet)
#### Post date: [July 22, 2019, 7:56am UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/4 "2019-07-22T07:56:05Z")

</div>

I don’t think the MLX software has been updated for Pi4/Buster yet. Log a pull request on the GitHub.

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [July 22, 2019, 3:26pm UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/5 "2019-07-22T15:26:05Z")

</div>

This will be a problem with libbcm2835, I suspect, which hasn’t yet been updated to work on the Pi 4.

You should be able to build with `I2C_MODE=LINUX` and ignore the RPi-specific stuff.

---

<div class="post-metadata">

### Author: ![RichS](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@RichS](https://forums.pimoroni.com/u/RichS)
#### Post date: [July 22, 2019, 6:03pm UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/6 "2019-07-22T18:03:31Z")

</div>

No I never hot swap!

---

<div class="post-metadata">

### Author: ![RichS](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@RichS](https://forums.pimoroni.com/u/RichS)
#### Post date: [July 22, 2019, 6:52pm UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/7 "2019-07-22T18:52:12Z")

</div>

Just moved it on to a Pi 3 and it all works OK.

---

<div class="post-metadata">

### Author: ![RichS](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@RichS](https://forums.pimoroni.com/u/RichS)
#### Post date: [July 22, 2019, 6:53pm UTC](https://forums.pimoroni.com/t/thermal-camera-problem/11042/8 "2019-07-22T18:53:36Z")

</div>

Thanks for the help everyone.
