nxtprograms.com

Fun Projects for your LEGO® MINDSTORMS®

Home     Projects     Help     Contacts

Compass
Building  
Programming  

This simple project uses the hub's internal gyro sensor to imitate a handheld magnetic compass. The gyro can't tell which direction is actually north, but it starts by defining north to be the direction that the model is pointed when you run the program. Then the red pointer will always point north even when you rotate the model around.

You can press one of the hub arrow buttons to reset the current direction to north at any time, and the display also shows "N", "S", "E", or "W" if the model is within 10 degrees of pointing that direction relative to its idea of north.
 

The starting direction
is defined as north.

The red arrow points north,
and your direction is displayed.

Press an arrow button to
reset the north direction.

     
   

 

Building Instructions

 

 

Home     Projects     Help     Contacts

 

Copyright © 2007-2021 by Dave Parker.  All rights reserved. 
All project designs, images, and programs are protected by copyright.  Please see the usage policy.