référence langage

Target : Is to create an LED light fade effect when you press a button

How : A switch is connected to pin 3 of the Arduino, the program detect when the user push the switch. a PWM is used to modulate the output signal N°9

Wiring : same wiring for the LED. The resistor 10K is used to set to low state the input 13 when the button is open

Technology : PWM, is a technique for getting analog results with digital means. Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal spends off.

Soft : pinMode(pin,OUTPUT) : Configures the specified pin to output. digitalRead(pin) : Reads the value from a specified
digital pin, return HIGH or LOW.
analogWrite(pin,value):Writes an analog value
(PWM wave) to a pin

Components :Resistor 220Ohms, 10KOhms
switch, led,

Class 04 - PWM