Sense hat with potato?

im trying to get the raspberry pi sense hat to work on the AML-S905X-CC (Le Potato) anytime i try running something using thonny, it uses the internal emulator. am i missing something? (yes ive installed the sense hat with the command line)

I’d recommend using Geany, or some other text editor, and running your applications from the terminal. Thonny has always misbehaved for me, and the only thing I found it was actually good for is programming RPi Pico’s using Micro Python. Thonny didn’t even want to cooperate when I started using Circuit Python on Adafruit’s RP2040 boards, so I usually use Mu for that purpose now. Geany also works with other languages so it will still be useful if you graduate from Python to C/C++ or something.

thank you so much! work like a charm

1 Like

There’s also a Sense HAT overlay in the wiring that uses the kernel IIO drivers for a lot of the sensors and exposes them using standard virtual files in /sys. You can also try that instead of libraries that directly read and translate the values in userspace.

how would someone go about using that? (im very new to pi’s)

Here is the info on the wiring tool used to apply overlays.

I haven’t used this hat, but the sensors should be available as files in /sys/class/iio/devices. To read the adc built into the potato, for example, (1.8v max btw):
cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

Google “Reading from Linux iio devices” for more on that.

Hope that helps.

The overlay is here: libretech-wiring-tool/libre-computer/aml-s905x-cc/dt/rpi-sense.dts at master · libre-computer-project/libretech-wiring-tool · GitHub

You should be able to enable them just by first enabling i2c-ao

sudo ldto enable i2c-ao
sudo ldto enable rpi-sense

To make it permanent, sudo ldto merge i2c-ao rpi-sense.

just got done trying these and it has power now (turns on to the default rainbow coloring). but it still always opens the emulator to actually run scripts and such

A lot of code targeting the Sense HAT sensors manually probes the I2C addresses instead of using the Linux kernel IIO drivers provided data. You have to figure out what exactly the code you are running is doing in the back. We prefer the IIO sensor data from the kernel.

The LEDs we have not played with. It should be using I2C addresses and registers to hold the LED colors.