7. Case 04: A Basic Car¶
7.3. Materials Required¶
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.