Autonomous Robot Racer: Scratch Mode


when  when Arduino starts up"



Yüklə 3,38 Mb.
Pdf görüntüsü
səhifə10/11
tarix26.09.2023
ölçüsü3,38 Mb.
#148986
1   2   3   4   5   6   7   8   9   10   11
Autonomous-Robot-Racer-Scratch-Mode

when 
when Arduino starts up"
Arduino starts up".
2. Click, hold, and drag until you see the 
Sp_Forward
Sp_Forward block. You will notice comments on what input
bubble controls which motor. The orientation of the robot for these comments is the rear of the robot
facing you.
3. Click on the left input bubble and insert any whole number between 0 and 255. Input the same number
into the right bubble. We use what is known as pulse width modulation, or PWM for short, to control the
speed of the robot. For more info on this click here. Basically, 0 is o and 255 is the maximum speed. You
can adjust the speed of how fast you want your car to go in a straight line by inserting numbers less than
255 for example, the value of 180 will drive the motors slowly. On some tracks going at full speed will
cause the car to crash through a wall. experiment with di erent values to get the best results.
4. Locate the 
Sp_Left
Sp_Left block. The rst bubble controls how fast the one wheel turns forward and the other
controls how fast the other wheel travels backwards. Reversing one of the wheels during a turn will cause
the robot to make a sharper turn. Experiment with di erent turning and breaking speeds to nd the
optimal turn around a corner.
5. Locate the 
Sp_Right 
Sp_Right block. The rst bubble controls how fast the one wheel turns backwards and the
other controls how fast the other wheel travels forwards. Reversing one of the wheels during a turn will
cause the robot to make a sharper turn. Experiment with di erent turning and breaking speeds to nd
the optimal turn around a corner.
6. Connect your car to your computer and upload the code to the computer. You can refer to the beginning
of this section for a refresher on how to upload code to an Arduino Nano.
Autonomous Robot Racer: Scratch Mode: Page 59


Autonomous Robot Racer: Scratch Mode: Page 60


Autonomous Robot Racer: Scratch Mode: Page 61


Autonomous Robot Racer: Scratch Mode: Page 62


Autonomous Robot Racer: Scratch Mode: Page 63


Autonomous Robot Racer: Scratch Mode: Page 64


Autonomous Robot Racer: Scratch Mode: Page 65


Autonomous Robot Racer: Scratch Mode: Page 66


Autonomous Robot Racer: Scratch Mode: Page 67


Autonomous Robot Racer: Scratch Mode: Page 68


Autonomous Robot Racer: Scratch Mode: Page 69


Autonomous Robot Racer: Scratch Mode: Page 70



Yüklə 3,38 Mb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   10   11




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin