Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Physics Expert

OVERVIEW

In this activity, you will control the servo motor provided along with the 321Maker shield.

OUTCOMES
By the end of this assignment you will be able to:
- Use Servo library to control micro servo.
- Control servo using input devices.

REQUIREMENTS
- Arduino-Compatible board
- 321Maker shield
- USB Cable
- Arduino Software
- SG90 9 g Micro Servo
- Account on a Git repository hosting service

BACKGROUND

"Servos have integrated gears and a shaft that can be precisely controlled. Standard servos allow the shaft to be positioned at various angles, usually between 0 and 180 degrees.".

LEVEL 1: SETUP
- Create a new source code repository on your GitLab account. Use the starter code repository as your starting point.
- Open Visual Studio Code.
- Clone the repository into your local hard drive.
- Select file servoControl.ino.
- Connect your servo motor to the 321Maker shield as follows: Connect the devices as follows.
321Maker Servo GND ----------- GND
VCC ----------- VCC
D9 ----------- Pulse
- Connect the Arduino to your computer using the USB port.
- Make sure you select the correct Arduino board and communications port (don't forget to set bound rate).
- Make sure the code uses the correct pin, change it if necessary.
- Fix code so that it complies with servo specification:
- Verify that code compiles without error.
- Upload program to Arduino board.
- Congratulations, your should see the servo motor sweep side to side.
- Demo to your instructor

LEVEL 2: PROGRAM MODIFICATION
- Implement knob functionality using the 321Maker rotation sensor. You probably want to use the map function.
- Commit changes.
- Demo to your instructor

LEVEL 3: ADVANCED
- Add code so that servo also rotates depending on the button pressed. Button 1 should move the servo to the left (1 degree at a time). Button 2 should rotate the servo to the right (1 degree at a time).
- Commit changes.
- Demo to your instructor
- Change code so that it uses the buzzer to indicate that the servo has reached its maximum rotation angle.
- Commit changes
- Demo to your instructor

Attachment:- Visual Studio Code.rar

Physics, Academics

  • Category:- Physics
  • Reference No.:- M92534176

Have any Question?


Related Questions in Physics

Additional problem 1unpolarized light passes through two

ADDITIONAL PROBLEM 1 Unpolarized light passes through two polarizers whose transmission axes are at an angle # with respect to each other. What should be the angle # between the transmission axes of the polarizers if it ...

Question point charges q1 200 muc and q2 -200 muc are

Question: Point charges q1 = +2.00 (mu)C and q2 = -2.00 (mu)C are placed at adjacent corners of a square for which the length of each side is 1.00 cm. Point a is at the center of the square, and point b is at the empty c ...

The first modern olympics of 1896 had a marathon distance

The first modern Olympics of 1896 had a marathon distance of 40 km. In 1908, for the Olympic marathon in London, the length was set at 42.195 km to provide the Royal Family with a better view of the race. Other distances ...

Question a solid disk of mass m1 96 kg and radius r 024 m

Question: A solid disk of mass m1 = 9.6 kg and radius R = 0.24 m is rotating with a constant angular velocity of ? = 30 rad/s. A thin rectangular rod with mass m2 = 3.4 kg and length L = 2R = 0.48 m begins at rest above ...

A high-speed train is built to be 600 m long the train is

A high-speed train is built to be 600 m long. The train is passing through a 500 m long tunnel. a. At what speed, according to an observer on the ground, the train will be just completely covered by the tunnel at one ins ...

Question a parallel-plate air capacitor has a capacitance

Question: A parallel-plate air capacitor has a capacitance of 920 pF. The charge on each plate is 2.55 ?C What is the potential difference between the plates? If the charge is kept constant, what will be the potential di ...

Question a rock thrown with speed 105 and launch angle

Question: A rock thrown with speed 10.5 and launch angle 30.0(above the horizontal) travels a horizontal distance of = 18.0before hitting the ground. From what height was the rock thrown? Use the value = 9.810 for the fr ...

A clock is set against an accurate standard and 30 days

A clock is set against an accurate standard and 30 days later is found to be in error by 12 seconds. What is the percentage of error in its time keeping?

Question a parallel-plate air capacitor has a capacitance

Question: A parallel-plate air capacitor has a capacitance of 920 pF. The charge on each plate is 3.90 ÎC. What is the potential difference between the plates? Express your answer with the appropriate units. Part B If th ...

An inflatable life raft is released from an air plane at

An inflatable life raft is released from an air plane at 500 m altitude, in level flight, with an air speed of 20 m/s in the horizontal direction. How long before the raft strikes the water? How far from the release poin ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As