Sweep

Intro :

When working with kinetic components we encounter another area to troubleshoot mechanically.

In this example there is a Functional Error in the code which successfully compiles but results in an unexpected movement from the Servo. Try decifer where the issue arises.

---------------------------------------------------------------------------->

Sweeping Servo :

Pins

    Servo = D9
---------------------------------------------------------------------------->

Feedback Shield :

If you have a feedback shield place it on top of your Arduino board and view what visual feedback you get when you make changes to your code.

In this visual GIF the shield is reponding correctly but look closely at what the LEDs doing or not doing and what colour are they when uploading the Functional Error code below.

More information on the Feedback Shield can be found here

---------------------------------------------------------------------------->

Try it :

Try edit the code to turn the jittery servo motor into a smooth sweeping behaviour. Consider what lines of code might need to be added to create the mechanical difference.

Copy the Function Error code below into your Arduino IDE and begin editing it. Once you think you have solved the Functional Error upload to your board to see the visual difference. Remember to check the board and port match your Arduino board and USB port in use.

You can also experiment with your code edits using the embedded TinkerCAD circuit above. Click on the TinkerCAD icon to open the dashboard in a seperate tab. Then press the code button to edit the blockly or text-based code. Press start simulation to see the changes in action.

---------------------------------------------------------------------------->

J3n Sykes

GitHub | Back to examples