Create your own code to generate a PWM signal at a configurable frequency. Do not use the built-in PWM generator, write software to do it instead. Use a 4-bit input, so the full range should be represented by 0-15. For example, an input of 4 should produce a 25% duty cycle. Write code that uses your PWM to change the brightness of an LED from 0 to full in 4 seconds (so increase 25% each second). Test that code at the following PWM frequencies: 20Hz, 50Hz, 100Hz, 200Hz. Demonstrate this at all four frequencies.
For this deliverable, we want to connect a servo to the RP Pico. Your kit should contain instructions for this (Project 21 in the kit recommended to buy). Once you are done with that, try to control your servo with the PWM code you wrote in Deliverable A. Does it work at any frequency?
When you are done experimenting with your PWM code, use the hardware PWM to control the servo, sweeping across all positions in about 5 seconds. Demonstrate this.
For this deliverable, you will build a “Useless Machine”. For example, see: https://www.youtube.com/watch?v=kproPsch7i0. You are encouraged to be creative when accomplishing this! To receive full credit, you need to:
You are encouraged to use anything in your kit to accomplish this. Be creative with your interpretation of what a “switch” and “actuator” mean. When in doubt, ask the instructor if your solution meets the objective. You do not need to build a rugged, permanent setup for this. You only need to make sure it can survive a demo. Switches and other hardware will be available to borrow if needed.
Demo