Thanks for your edit!
This edit will be visible only to you until it is peer reviewed.

I am using Trinket to emulate Raspberry Pi Sense Hat. I roll 60 degrees and found reading OK. But when I roll to 170 degrees, reading is not correct. Have I done anything wrong?

Grettings Fabian

put on hold as unclear what you’re asking by MilliwaysDarth Vader 39 mins ago

Please clarify your specific problem or add additional details to highlight exactly what you need. As it’s currently written, it’s hard to tell exactly what you’re asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

  • what is a roll? … what does do math stuff mean? … you asked only one question, and it is nonsense … please ask a real question – jsotola 10 hours ago
  • i reread your post several times …. it appears that you are asking a simple arithmeric question that has nothing to do with RPi and nothing to do with programming …. please clarify what it is that you are asking – jsotola 7 hours ago
  • @Fabian, I feel jealous that you have a senseHat. I read about it in MagPi and also in the news. But I am too poor to afford one. Perhaps I should google and learn, and try to DIY one. Sense HAT – an add-on board for Raspberry Pi, made especially for the Astro Pi mission raspberrypi.org/products/sense-hat – tlfong01 5 hours ago    
  • I googled to refresh my memory. raspberrypi.org/products/sense-hat Sense HAT add-on board for Rpi, made especially for the Astro Pi mission – it launched to the International Space Station in Dec 2015 – and is now available to buy. Has 8×8 RGB LED matrix, a five-button joystick and includes the following sensors: Gyroscope, Accelerometer, Magnetometer, Temperature, Barometric pressure, Humidity, We’ve also created a Python library providing easy access to everything on the board. Wow, so it is GyroAcceleroMagnetoBaroHumid (11or 12 DOF?), python, … Still pythoning in space? – tlfong01 5 hours ago    
  • To make sure if SH is 10 DOF, I read: 9-DOF for Rpi raspberrypi.stackexchange.com/questions/74865/…Now I am pretty sure SenseHat is 11DOF!. So E14 selling HK$400 is good buy. Need to try my MEMS GyroAccelero soon. Perhaps I should revise my playing notes and see if I can answer @Fabian’s question. He says roll 60 degrees is OK, but no luck when over 180 degrees, or negative something? But I forgot my TRIGONOMETRY. Should youTube again. 🙂 youtube.com/watch?v=R4GLAKEjU4w – tlfong01 5 hours ago   
  • I read my answer to the above question and found my own advice: Recommendation to MEMS newbies: MPU9250 will very soon replaced by DOF10 modules. But for newbies who have never played with gyros or acceleros, it is no hurry to start with DOF 9 with magnetos. I think DOF 6 MPU6050 (gyro and accelero) is OK to start. Or to start as easy as possible, I would recommend ADXL345, a very popular accelero, recommended by both SparkFuna and AdaFruit. So to answer @Fabian’s trigonometry question, perhaps I should find the 3DOF ADXL345 which is collecting dust in my junk box, … 🙂 – tlfong01 5 hours ago   
  • I am not sure if Rpi Sense Hat is using MPU6050. If yes, then I can use my dusty MPU6050 to help answering @Fabian’s trIgonometery question. So I googled my old learning notes: (1) raspberrypi.org/forums/… (2) raspberrypi.org/forums/… – tlfong01 4 hours ago   
  • So I googled to find if SenseHat is using MPU6050. The Sense HAT Rpi – 6 Types of Sensors Device – DevicePlus 2017jun20 (1) deviceplus.com/how-tos/raspberrypi-guide/… DevicePlus’s tutorial is very good for newbies like me. After skimming through the article, I came to a quick and dirty conclusion that even expensive 11 DOF SenseHat is not using my dirt cheap MPU6050 6DOF thing, I can still try the OP’s test and see if I can get good roll readings and thus solve his problem. – tlfong01 4 hours ago    
  • I googled further and found that Rpi SenseHat is not using my cheapy MPU5060, but the advanced 9DOF BNO055. (1) Adafruit BNO055 Absolute Orientation Sensor learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/… (2) BNO055 Datasheet – Bosch cdn-shop.adafruit.com/datasheets/BST_BNO055_DS000_12.pdf I am a newbie and should not start with a 9DOF MEMS. I think I should be humble and MPU6050 should be appropriate for me. 🙂 – tlfong01 4 hours ago  
  • @Fabian, it appears that you have a “sign and magnitude” problem. EG, for a particular set of sign and magnitude rules, you roll counter clockwise from +-0 degrees to +90 deg, to +180 deg, then to +190 deg. But if you roll clockwise from +- 0 deg to -90 deg, then to -170 deg. Now, -170 deg is the same as +190 deg. Some other rules might let you roll from 0 to 90, to 180, 270, and back to 0. In other words, it all depends on the rules you use. Perhaps you can use SenseHat’s python library API to set the rules you like, then you don’t need to do any calculations, / to continue, … – tlfong01 3 hours ago   
  • To clearyfi my Problem, When i turn the rollslide on the Emulator to like -xxx° it Prinz me like 260 or so degree in the console Im going to post a vid when im home again – Fabian 2 hours ago
  • Code the Sense HAT in Your Browser! @Fabian, Thank you for your clarification and the video. The video is not clear enough. Since you are using the emulator. Perhaps I will now forget the real thing, and play with the emulator. Just to make sure, are you using the following emulator? “New from Trinket and the Raspberry Pi Foundation: Explore Your World with Sensors and Python” – trinket.io/sense-hat trinket.io/sense-hat – tlfong01 1 hour ago   



  1. I am using Trinket emulator to play with SenseHat.
  2. Rolling to 60° is good, but -171° gives somethings like -189°. Why?


Let me see. I read about SenseHat in MagPi, but I have never seen the real thing, or played with the fake thing using an emulator. Perhaps now I can start playing with the fake thing first, and buy the real thing later.

Now I am playing with trinket on Chinese Windows 10. I wrote a little program to print time and found everything OK, except it is python 2.7, not 3.0. I need to find out how to do python 3.0

Chinese Win10 trinket time

/ to continue, …


Trinket Home Page

Trinket Python Modules

Trinket SenseHat

Trinket Free and Paid Plans

/ to continue, …


Appendix A – Trinket Introduction Web Page

Code the Sense HAT in Your Browser! New from Trinket and the Raspberry Pi Foundation: Explore Your World with Sensors and Python, …

Trinket SenseHat Home Page

Trinket SenseHat

Appendix B – Trinket Python Program – Time

Trinket time

/ to continue, …

Not the answer you’re looking for? Browse other questions tagged   or ask your own question.

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: