12. Case 10: The Mechanical Crawler#

12.1. Purpose#


Make a mechanical crawler with NezhaA Inventor’s Kit.

../../_images/neza-a-case-10-01.png

12.2. Purchse#


NezhaA Inventor’s Kit

12.3. Materials Required#


../../_images/neza-a-case-10-02.png

12.4. Assembly Steps#


../../_images/neza-a-step-10-01.png ../../_images/neza-a-step-10-02.png ../../_images/neza-a-step-10-03.png ../../_images/neza-a-step-10-04.png ../../_images/neza-a-step-10-05.png ../../_images/neza-a-step-10-06.png ../../_images/neza-a-step-10-07.png ../../_images/neza-a-step-10-08.png ../../_images/neza-a-step-10-09.png ../../_images/neza-a-step-10-10.png ../../_images/neza-a-step-10-11.png ../../_images/neza-a-step-10-12.png ../../_images/neza-a-step-10-13.png ../../_images/neza-a-step-10-14.png ../../_images/neza-a-step-10-15.png ../../_images/neza-a-step-10-16.png ../../_images/neza-a-step-10-17.png ../../_images/neza-a-step-10-18.png ../../_images/neza-a-step-10-19.png ../../_images/neza-a-step-10-20.png ../../_images/neza-a-step-10-21.png ../../_images/neza-a-step-10-22.png ../../_images/neza-a-step-10-23.png ../../_images/neza-a-step-10-24.png ../../_images/neza-a-step-10-25.png ../../_images/neza-a-step-10-26.png ../../_images/neza-a-step-10-27.png ../../_images/neza-a-step-10-28.png

12.5. Hardware Connections#


Connect the motor to M1 port on Nezha-A master box.

../../_images/neza-a-case-09-03.png

12.6. Programming#


12.6.1. Prepare the programming#

Steps for preparation please refer to: Arduino 3 in 1 Breakout Board.

12.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() {

}

12.6.3. Result#

After powering on, it crawls forward.