Analog Sinus Wave

ANALOG (Sinus wave) GND (0V) Vss (-5V) Vcc (+5V)

Digital Square Wave

DIGITAL (Square wave) GND (0V) Vcc (+5V)

PWM-cycle Square Wave

PWM - Pulse Width Modulation

Duty cycle: 500Hz corresponding 2ms (Milliseconds) in time.

PWM 25% duty cycle t Cycle Width PWM 25% duty cycle t Cycle Width PWM 25% duty cycle t Cycle Width PWM Sine Wave Modulation t Cycle Width
void setup() {
  for(int i=17; i>=2; i--){
    pinMode(i, OUTPUT);
    digitalWrite(i, HIGH);
  }
}

void loop() {
  for(int i=2; i<=17; i++){
    digitalWrite(i, LOW);
    delay(100);
  }
  for(int i=17; i>=2; i--){
    digitalWrite(i, HIGH);
    delay(100);
  }
}