0% found this document useful (0 votes)
16 views

Reloj

Uploaded by

yesseniatarapues
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Reloj

Uploaded by

yesseniatarapues
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

const int segundo = 3;

const int minuto1 = 4;

const int minuto2 = 11;

const int minuto3 = 12;

int i=0;

int j=0;

void setup() {

// put your setup code here, to run once:

pinMode (segundo, OUTPUT);

pinMode (minuto1, OUTPUT);

pinMode (minuto2, OUTPUT);

pinMode (minuto3, OUTPUT);

void loop() {

// put your main code here, to run repeatedly:

for (i=0; i<=5; i++){

digitalWrite (segundo , HIGH);

delay (500);

digitalWrite (segundo,LOW);

delay (500);

j=j+1;

if (j==1){

digitalWrite (minuto1, HIGH);

if (j==2) {

digitalWrite(minuto2, HIGH);

if (j==3){
digitalWrite(minuto3, HIGH);

if (j==4) {

digitalWrite (minuto1 , LOW);

digitalWrite (minuto2 , LOW);

digitalWrite (minuto3 , LOW);

j=0;

You might also like