Enviro PHAT erratic magnetometer data

Hi Pimoroni (fans)!

I’ve used the (discontinued) Enviro-PHAT for it’s analog inputs and magnetometer a while back, and wanted to rebuild it (with a slightly different config, moving from a pi 3 to a pi zero with a battery pack).

Config

  • RasPi Zero WH
  • UPS-Lite V1.2 (tried without, to no avail)
  • Enviro-PHAT with 3 analog rotary knobs attached
  • Patchbox OS

What I tried
Unfortunately, I’m having problems getting the magnetometer to work as intended. I haven’t changed anything about the software I wrote to read the magnetometer, so that shouldn’t be a problem.

However, I did have to rebuild the SD card, so I’m not completely ruling out a software issue. I’ve re-installed the package according to the instructions on the GitHub Repo. SPI is pre-enabled on Patchbox OS.

The issue
The magneto meter (compass) returns completely inaccurate data. The analog buttons work perfectly, but I can’t rely on the compass at all. I’ve made a video to illustrate. Any idea what I could try? Is this faulty hardware? or should I try a full reinstall again?

Thanks in advance!