Phys Comp 1 24-25 Week 3 12-10-24
Phys Comp 1 24-25 Week 3 12-10-24
Phys Comp 1 24-25 Week 3 12-10-24
Physical Computing 1
ROBERT HALL
Homework Review
Any Questions so far?
Inspiration Time!
How was this done?
Plan for Today
• Homework Review
• Inspiration Time
• Recap of Last Week
• Analog Inputs and Outputs
• LDRs
• Servo Motors
• RGB LEDs
• Idea Generation
• 2nd Assignment
Schematics
•
The Pins with PWM have a
Uno
~ symbol on
• Examples>Basics>AnalogReadSerial
• Just like DigitalReadSerial, this code
reads the value of our Analog Input and
sends it to the Serial Monitor
• Set this Up and see if you can read an
Analog Input
There are many ways to do the same
thing in code
Dimming an LED
• Write a given value > LED Stays at one Brightness
• Fade it with a FOR loop > fades LED, but pauses main loop when it does so
• Fade it with an IF Statement in main loop > does not pause main loop
• Fade it with Incoming Data from a potentiometer > LED can be controlled with Potentiometer
Write Given Value