OrientationSensor on an amazon Fire tablet

I can not seem to get the OrientationSensor information from the amazon fire.
any thoughts?

Welcome Cathy

Did you try the using the OrientationSensor to determine if your device has orientation hardware. Some Android devices do not have an orientation sensor.

Check the Property Available which Indicates whether the orientation sensor is present on the device. If calling it returns false; sorry no orientation sensor.

What did you discover Cathy?

I made a simple program with
test_orientation.aia|attachment](upload://u8SHuMFjeP7VTTGoaUTs0J0la2L.aia) (2.4 KB)
And all I get in the 4 Orientation text boxes is "Hint for TextBox1" 2 -3-7 respectively.
The Accelerator boxes give me expected numbers.
For TextBox 7 I have Available in there at your suggestion above but I have tried Enabled and getting the same thing.

I was originally trying to use the orientation to control an a couple of servos hooked up to an arduino with this aia:

FPH4E4LIMDZ3IFI(1).aia (334.7 KB)

Looking to get a pitch and a roll to use the tablet orientation to a gimbal for a marble maze game.

Is there some way I can use the Accelerometer Sensor instead??

The arduino code is expecting pitch, roll \n in whole numbers.

If you place orientationsensorAvailable
in your app, connect via Companion and then perform a DoIt like this and the answer is false; you do not have orientation sensor hardware.

This is the accelerator documentation AccelerometerSensor . It explains what you can do with it. Sorry, it will not provide pitch and roll. It can tell you relatively how your device is tilted. I don't think that will help.

Do you have a gyroscope? Might be useful.

I don't see a ? in my OrientationSensor1.Available line? Is there some way to turn that on?

I guess I don't understand how to perform a DoIt??

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Got it thank you so much for your help - I have learned a lot just looking in to this - and No my Amazon fire hd does not have orientationsensor :frowning: now I guess I have to find a different tablet or phone to use for this app... or figure out how to get the accelerator to work. I read somewhere along the way that the orientation sensor was really just the accelerometer info mathematically manipulated so if I can figure that out maybe I can use the acceleromiter.... Thanks again for the quick responses!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.