Case 10: The Mechanical Crawler
Contents
13. Case 10: The Mechanical Crawler#
13.1. Purpose#
Make a mechanical crawler with NezhaA Inventor’s Kit.
13.2. Purchse#
13.3. Materials Required#
13.4. Assembly Steps#
13.5. Hardware Connections#
Connect the motor to M1 port on Nezha-A master box.
13.6. Programming#
13.6.1. Prepare the programming#
Steps for preparation please refer to: Arduino 3 in 1 Breakout Board.
13.6.2. Sample Code:#
// Language ArduinoC
#include <NezhaA.h>
NezhaA nezhaA; //Create an instance of Nezha category
void setup() {
nezhaA.begin(); //Initiliaze the buzzer, motor, servo and light
nezhaA.setMotorSpeed(M1, 100); //Set the speed of the motor connecting to M1 at 100%
}
void loop() {
}
13.6.3. Result#
After powering on, it crawls forward.