Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

arduino for command

// Dim an LED using a PWM pin
int PWMpin = 10;  // LED in series with 470 ohm resistor on pin 10

void setup() {
  // no setup needed
}

void loop() {
  for (int i = 0; i <= 255; i++) {
    analogWrite(PWMpin, i);
    delay(10);
  }
}
Source by www.arduino.cc #
 
PREVIOUS NEXT
Tagged: #arduino #command
ADD COMMENT
Topic
Name
6+6 =