Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer the following the questions based on the code snippet below; vold loop ( I ) ( U . Set notor a speed asd direction

Answer the following the questions based on the code snippet below;
vold loop (I)(
U. Set notor a speed asd direction-
ansloghrite(end,150); // Speed control (0-255)
digitaitrite (inl, Higin):
diq1caXWette(1n2, LCW);
1/5et notor B speed and direction
analoghirice lens, 1501; 17 speed control (0-255)
digivalivitee (1n3, H{(a);
1
a) Create a variable called motorSpeed that will store the speed of the dc motors. Rtwrite the code ariable is substituted for the value 150 and the motors are spinning in the opposite directions.
b) Create a second variable motor5peed2. Using motorSpeed and motorSpeed2, modify the code so that the motor B spinning at twice the speed of motor A in the same direction.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

2. What type of team would you recommend?

Answered: 1 week ago