Case 04: A Basic Car
Contents
7. Case 04: A Basic Car#
7.1. Purpose#
Make a basic car with NezhaA Inventor’s Kit.
7.2. Purchse#
7.3. Materials Required#
7.4. Assembly Steps#
7.5. Hardware Connections#
Connect two motors to M1 and M2 port on Nezha-A master box.
7.6. Programming#
7.6.1. Prepare the programming#
Steps for preparation please refer to: Arduino 3 in 1 Breakout Board
7.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() {
}
7.6.3. Result#
After powering on, the basic car drives with a curve routine.