Which way is North?
Compass
It uses the HUB's gyro sensor to emulate a compass. It's not magnetic, so we define north at the start. Therefore, refer to the contents below and define the north first before using it. Errors do occur over time. Set the north direction by pressing the arrow button on the front of the HUB. And if you rotate the HUB as shown above, the display will also show "N", "S", "E" or "W".
Programming
The gyro sensor detects three motion characteristics. Rotating in place (Yaw) / Rocking back and forth / Rocking left and right. Therefore, the HUB should not detect motion when it is stationary. So, when you are stationary, set Yaw to 0.
So, while still, point the stick to the north and press the arrow button on the HUB to set Yaw to 0. Therefore, the stick is always moved in the direction where the yaw value becomes 0 using a motor. And display the compass direction N,S,E,W according to the Yaw value.
![]() |
![]() |
(7) Save the Yaw value in the table.
(8) At this time, when the Ponit value is received, the motor operates with the Yaw value. (right picture)
(9) And mark on HUB.
If you press the arrow button on the HUB, the yaw angle will return to zero. The direction changes only when the amount of change in the yaw value exceeds 10 degrees. Below is the East-West-North-South display settings according to the Yaw value.
(2) If any of the Yaw values below do not match, it will be displayed as blank.
(5) Since S is in the same direction as 180 Degree or -180 Degree, we implemented two cases.
(13) To reduce the flickering of the displayed direction, display only when the direction is different from the current direction.