Hyperpixel 4 touch and i2c

I’m trying to use a hyperpixel 4 touch and another device on i2c, specifically an lsm303d acceleration sensor.

Basically if I comment out dtparam=i2c_arm=on in config.txt the display works, if I uncomment it the sensor works but I can’t get both working at once.

The acceleration sensor is connected to the breakout pins on the hyperpixel and i2c-1 diverted to i2c-3 as instructed here: https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-hyperpixel-4

New RasPi 4 using raspbian all up to date.

I have now partially fixed this problem.

Starting with a fresh install of raspian noobs, installed Hyperpixel touch then lsm303d

lsm303d attached to the breakout header.

lsm303d is now visible on i2c channel 7

so edited init.py line 166 to “self._i2c = smbus.SMBus(7)”

but touch is not working on the display

Go to the /dev directory and run ls -lah. There should be i2c-3 according to the instructions, but mine was i2c-7 for some reason, so I had to change the link command.