About two years ago, I needed to manage the geomagnetism with Raspberry Pi and Sense Hat, so I made this program as a trial.
Right now it only remains in the web emulator, but at that time it worked properly on the actual machine (RPi3 + Sense Hat).
https://trinket.io/library/trinkets/a50728f4da
This is a trinket for the RPi emulator. It works as well as the actual machine. It's too wonderful when this is free to use.
I haven't done much at all. With Python, the azimuth can be taken suddenly in the library, so depending on the numerical value of the azimuth, this azimuth is decided from how many times to how many times it is displayed.
As for the kanji display, since the liquid crystal display of Sense Hat is 8x8 dots, you only need to create and display an 8x8 JPEG image with dots like kanji.
With other OSs, only the raw values of the accelerometer and magnetic sensor can be obtained, so it is super troublesome to correct the tilt of the terminal from there and calculate the azimuth from the sensor value, but Python is super troublesome. Volunteers from all over the world have prepared a useful library, so it's super easy.
Even if you don't have an actual device, you can enjoy it with just a web emulator, so I recommend it. After all programming is fun if you make something that works.