Week 02
This week I learned a lot about sensor, analog read, speaker and servo.
Notes
Oscilloscope
-
Vd change the volt per division
-
pulse width modulation (PWM) The Arduino and other digital microcontrollers generally can’t produce a varying voltage, they can only produce a high voltage or low voltage. Instead, you “fake” an analog voltage by producing a series of voltage pulses at regular intervals, and varying the width of the pulses. This is called pulse width modulation (PWM).
-
Pseudo-analog voltage Average voltage
Speaker
-
tone(pin, frequency, duration);
-
Array int arrayName[]={x,y,z,...}
-
Tone durationa quarter note is one quarter of a second, and eighth note is one eighth of a second, and so forth. In that case, the actual duration for each note is 1000 milliseconds divided by the value for it in the durations array. For example, the first note is 1000/4, the second is 1000/8
Servo
-
Vd change the volt per division
-
pulse width modulation (PWM) The Arduino and other digital microcontrollers generally can’t produce a varying voltage, they can only produce a high voltage or low voltage. Instead, you “fake” an analog voltage by producing a series of voltage pulses at regular intervals, and varying the width of the pulses. This is called pulse width modulation (PWM).