Mudanças entre as edições de "Arduino:Portas Digitais"

De BrapciWiki
Ir para navegação Ir para pesquisar
(Criou página com ' int led = 3; int time = 500; void setup() { // put your setup code here, to run once: pinMode(led, OUTPUT); digitalWrite(0, LOW); digitalWrite(1, LOW); } void loo...')
 
 
Linha 1: Linha 1:
 +
Ativa um LED na porta 3 (Digital)
 
  int led = 3;
 
  int led = 3;
 
  int time = 500;
 
  int time = 500;

Edição atual tal como às 17h22min de 21 de abril de 2023

Ativa um LED na porta 3 (Digital)

int led = 3;
int time = 500;
void setup() {
 // put your setup code here, to run once:
 pinMode(led, OUTPUT);
 digitalWrite(0, LOW);
 digitalWrite(1, LOW);
}
void loop() {
 digitalWrite(led, HIGH);
 delay(time);
 digitalWrite(led, LOW);
 delay(time);
}