Assemble

1.1. Components Needed.

Img

1.2. Installation Diagram.

Img

1.3. Prototype.

Img

2.1. Components Needed.

Img

2.2. Installation Diagram.

Img

Img

Img

2.3. Prototype.

Img

3.1. Components Needed.

Img

Img

3.2. Installation Diagram.

Img

3.3. Plug Wire.

Img

3.4. Prototype.

Img

4.1. Components Needed.

Img

4.2. Rotate the servo to 90 degrees.

Img

//*****************************************************************
/*
Set the 90-degree code,Copy the code and upload it to the development board. The steering gear connected to port A3 will rotate to 90 °
*/
#define servoPin A3  //servo Pin
int pos; //the angle variable of servo
int pulsewidth; // pulse width variable of servo
void setup() {
  pinMode(servoPin, OUTPUT);  //set servo pin to OUTPUT
  procedure(0); //set the angle of servo to 0°
}
void loop() {

    procedure(90);              // tell servo to go to position in variable 90°

}
// function to control servo
void procedure(int myangle) {
  pulsewidth = myangle * 11 + 500;  //calculate the value of pulse width
  digitalWrite(servoPin,HIGH);
  delayMicroseconds(pulsewidth);   //The duration of high level is pulse width
  digitalWrite(servoPin,LOW);
  delay((20 - pulsewidth / 1000));  // the cycle is 20ms, the low level last for the rest of time
}
//*****************************************************************

Copy the above code to arduino IDE, then upload the code to the V4.0 motherboard, after uploading it successfully, the servo will rotate to the 90° position.

4.3. Installation Diagram.

Img

Img

Img

Img

4.4. Prototype.

Img

5.1. Components Needed.

Img

5.2. Installation Diagram.

Img

Img

5.3. Prototype.

Img

6.1. Components Needed.

Img

Img

6.2. Installation Diagram.

Img

Img

6.3. Prototype.

Img

7.1. Components Needed.

Img

7.2. Installation Diagram.

Img

Img

7.3. Prototype.

Img

8.1. Wiring Diagram.

Img

8.2. M2 Motor is connected to B interface,,M3 Motor is connected to A interface.

Img

8.3. M1 Motor is connected to B1 interface,M4 Motor is connected to A1 interface.

Img

8.4. The wiring of the 3-channel line-tracking sensor.

Img

8.5. The power supply is connected to BAT.

Img

8.6. The wiring of the ultrasonic sensor.

Img

Img

8.7. The wiring of the 8*16 LED Board.

Img

Img

8.8. The wiring of the servo.

Img

Img

8.9. Plug in the Bluetooth module and jumper caps.

Img

Note: Before uploading the test code, you need to remove the Bluetooth module, otherwise the code will fail to be uploaded.Connect the Bluetooth module after uploading the code successfully.



8.10. Complete Prototype.

Img