Pesquisar neste blog

07/01/2020

Programa 2

Acender Led com intervalo de tempo em Arduino

void setup() {
  // put your setup code here, to run once:
  pinMode(10, OUTPUT);
  pinMode(9, OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  int intervaloPisca;
  intervaloPisca = 700;

  digitalWrite(10, HIGH);
  digitalWrite(9, LOW);
  delay(intervaloPisca);//500 milesegundos

  digitalWrite(10, LOW);
  digitalWrite(9, HIGH);
  delay(intervaloPisca);
}

Créditos para https://cursodearduino.net/

Nenhum comentário: