void loop() {
// Left
analogWrite(IN1,225);
analogWrite(IN2,0);
// Right
analogWrite(IN3,speed);
analogWrite(IN4,0);
}
2.3.4- Test the Current
Application
1-
Connect the Arduino UNO board of the 4WD robot car to
computer’s USB port with USB cable to upload the code
2- if the Code upload success, Turn the Power Slide
switch ON
3- Movement Project 2 - Test the all Movement Directions of the 4
WD Robot Car, the Motor Drives
3.1- Schemas of Movements ...
3.2- Connections
3.3- the Code of the
Current Application, using the Mixly Software
Current Mixly application - (4 KB zip
file)
download
3.3.1- Picture, the Mixly
Blocks(block programming) of the Current Application
3.3.2- Picture, the Mixly
Code of the Current Application,
Equivalent to C / C++
3.3.3- the Code of the
Current Application - (C
/ C++)
volatile int IN1;
volatile int IN2;
volatile int IN3;
volatile int IN4;
1-
Connect the Arduino UNO board of the 4WD robot car to
computer’s USB port with USB cable to upload the code
2- if the Code upload success, Turn the Power Slide
switch ON
4.2- the Code of the
Current Application, using the Mixly Software
Current Mixly application - (1 KB zip
file)
download
4.2.1- Picture, the Mixly
Blocks(block programming) of the Current Application
4.2.2- Picture, the Mixly
Code of the Current Application, Equivalent to C / C++
4.2.3- Test the Current
Application
1-
Connect the Arduino UNO board of the 4WD robot car to
computer’s USB port with USB cable to upload the code
2- if the Code upload success, Turn the Power Slide
switch ON
5.2- the Code of the
Current Application, using the Mixly Software
Current Mixly application - (1 KB zip
file)
download
5.2.1- Picture, the Mixly
Blocks(block programming) of the Current Application
5.2.2- Picture, the Mixly
Code of the Current Application, Equivalent to C / C++
5.2.3- Test the Current
Application
1-
Connect the Arduino UNO board of the 4WD robot car to
computer’s USB port with USB cable to upload the code
2- if the Code upload success, Turn the Power Slide
switch ON
6.2- the Code of the
Current Application, using the Mixly Software
Current Mixly application - (1 KB zip
file)
download
6.2.1- Picture, the Mixly
Blocks(block programming) of the Current Application
6.2.2- Picture, the Mixly
Code of the Current Application, Equivalent to C / C++
6.2.3- Test the Current
Application
1-
Connect the Arduino UNO board of the 4WD robot car to
computer’s USB port with USB cable to upload the code
2- if the Code upload success, Turn the Power Slide
switch ON
7.2.1.1- the Code of the
Current Application, using the Mixly Software
Current Mixly application - (1 KB zip
file)
download
7.2.1.2- Picture, the Mixly
Blocks(block programming) of the Current Application
7.2.1.3- Picture, the Mixly
Code of the Current Application, Equivalent to C / C++
7.2.1.4- Test the Current
Application and Result
1-
Connect the Arduino UNO board of the 4WD robot car to
computer’s USB port with USB cable to upload the code
2- if the Code upload success, Turn the Power Slide
switch ON
3-
After powering on, open the serial monitor and
set baud rate to 9600.
4- Take out the remote control, and send signal to the
infrared receiver sensor. You can see the key
value of the corresponding key
7.2.2- Project - Controlling a
Multi-Functional 4 Wheel Drive Robot Arduino Car with a
Remote control (IR Controller)
7.2.2.1- the Code of the
Current Application, using the Mixly Software
Current Mixly application - (4 KB zip
file)
download
Note:
1- Because the IR Receiver is a digital sensor, thus, the
output received from it will either be 1 (hight) or 0
(low)
2- in Arduino programming language, the digitalWrite() is
used for controlling digital pins,
3-
IR Receiver conflict with analogueWrite
4- The difference between digitalWrite() and analogWrite() in
Arduino programming language is that digitalWrite() is
used for controlling digital pins, while analogWrite() is
used for controlling PWM (pulse-width modulation) pins for
smooth control of analog-like signals.
7.2.2.2- Picture, the Mixly
Blocks(block programming) of the Current Application
7.2.2.3- Picture, the Mixly
Code of the Current Application, Equivalent to C / C++
7.2.2.4- Test the Current
Application
1-
Connect the Arduino UNO board of the 4WD robot car to
computer’s USB port with USB cable to upload the code
2- if the Code upload success, Turn the Power Slide
switch ON