Hexapod robots used in the Indonesian Robot Contest (KRI) have relied solely on ultrasonic sensors for obstacle detection, resulting in measurement errors on inclined surfaces that caused navigation failures. This study aims to implement a compass sensor navigation system on a hexapod robot and to determine its success rate in traversing inclined obstacles. An experimental method was used, employing the accelerometer and magnetometer of the LSM9DS1 IMU on an Arduino Nano BLE 33 to compute Pitch and Yaw angles, integrated with four ultrasonic sensors and fuzzy logic processed on an ESP32 microcontroller to control 18 servo motors. Calibration produced stable Offset and Slope values for both sensors. Accuracy testing showed a Pitch error of 0.27° on an inclined surface and 0.75° on a flat surface, with Yaw repeatability of 0.03°–0.18°. The ultrasonic sensors achieved 0 cm error in six of eight readings. Fuzzy logic testing achieved a 66.7% success rate (4 of 6 scenarios), with the two failures traced to a decision-layer program gap rather than the fuzzy rule base, and subsequently corrected. The system improved the hexapod robot's ability to traverse inclined obstacles compared to the previous ultrasonic-only approach.
Copyrights © 2026