6. Case 04: A Basic Car#

6.1. Purpose#


Make a basic car with NezhaA Inventor’s Kit.

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

6.2. Purchse#


NezhaA Inventor’s Kit

6.3. Materials Required#


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

6.4. Assembly Steps#


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

6.5. Hardware Connections#


Connect two motors to M1 and M2 port on Nezha-A master box. ../../_images/neza-a-case-04-03.png

6.6. Programming#


6.6.1. Prepare the programming#

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

6.6.2. Sample Projects:#

// Language ArduinoC
#include <NezhaA.h>

NezhaA nezhaA;    //Create an instance of NezhaA 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%
  nezhaA.setMotorSpeed(M2, 30);   //Set the speed of the motor connecting to M2 at 30%
}

void loop() {
}

6.6.3. Result#

After powering on, the basic car drives with a curve routine.