The layout for our compass (shown in the next screenshot) is simple (okay, the whole thing is simple—again, the beauty of creating apps with App Inventor). In Design, the important components are an indicator (the small canvas centered as we did earlier), a large canvas, (mine is Fill Parent wide, 300
pixels high), and an image sprite on top of the large canvas.
For the image sprite, I found the graphic of a compass rose (the twirly thingamabob in compasses) and let that be the image for the sprite, making it 300
pixels high and wide.
Drop in an orientation sensor, and we're done with design!
And, the neat thing—looking at my test device—I saw that the compass rose sprite was already centered! So, that really makes things a breeze as we saunter over to the Blocks Editor.
Drag out the OrientationSensor1.OrientationChanged frame block from its drawer. Get an ImageSprite1.Heading (heading is another term for azimuth) and click it in, and a value azimuth from...