Skip to main content
formatted code for readability
Source Link
per1234
  • 4.3k
  • 2
  • 24
  • 44

Arduino INTint problem

It´s my first time asking a question here.

I made a counter to count pulses:

int count  = 0 ;
.
.
.
setup()
{

}


while(count <= 35000)
{
 
digitalWrite(9,HIGH);
delayMicroseconds(500);
digitalWrite(9,LOW);

   count = count +1;
}
int count  = 0 ;
.
.
.
setup()
{    
}    

while (count <= 35000)
{    
  digitalWrite(9, HIGH);
  delayMicroseconds(500);
  digitalWrite(9, LOW);

  count = count + 1;
}

But , when I try "while(count <= 40000)" while(count <= 40000), it does not stop counting.

That´s all.

Thanks

Arduino INT problem

It´s my first time asking a question here.

I made a counter to count pulses:

int count  = 0 ;
.
.
.
setup()
{

}


while(count <= 35000)
{
 
digitalWrite(9,HIGH);
delayMicroseconds(500);
digitalWrite(9,LOW);

   count = count +1;
}

But , when I try "while(count <= 40000)" , it does not stop counting.

That´s all.

Thanks

Arduino int problem

I made a counter to count pulses:

int count  = 0 ;
.
.
.
setup()
{    
}    

while (count <= 35000)
{    
  digitalWrite(9, HIGH);
  delayMicroseconds(500);
  digitalWrite(9, LOW);

  count = count + 1;
}

But when I try while(count <= 40000), it does not stop counting.

It´s my first time asking a question here.

I made a counter to count pulses:

int count = 0 ; . . . setup() {

}

while(count <= 35000) {

digitalWrite(9,HIGH); delayMicroseconds(500); digitalWrite(9,LOW);

count = count +1; }

int count  = 0 ;
.
.
.
setup()
{

}


while(count <= 35000)
{
 
digitalWrite(9,HIGH);
delayMicroseconds(500);
digitalWrite(9,LOW);

   count = count +1;
}

But , when I try "while(count <= 40000)" , it does not stop counting.

That´s all.

Thanks

It´s my first time asking a question here.

I made a counter to count pulses:

int count = 0 ; . . . setup() {

}

while(count <= 35000) {

digitalWrite(9,HIGH); delayMicroseconds(500); digitalWrite(9,LOW);

count = count +1; }

But , when I try "while(count <= 40000)" , it does not stop counting.

That´s all.

Thanks

It´s my first time asking a question here.

I made a counter to count pulses:

int count  = 0 ;
.
.
.
setup()
{

}


while(count <= 35000)
{
 
digitalWrite(9,HIGH);
delayMicroseconds(500);
digitalWrite(9,LOW);

   count = count +1;
}

But , when I try "while(count <= 40000)" , it does not stop counting.

That´s all.

Thanks

Source Link

Arduino INT problem

It´s my first time asking a question here.

I made a counter to count pulses:

int count = 0 ; . . . setup() {

}

while(count <= 35000) {

digitalWrite(9,HIGH); delayMicroseconds(500); digitalWrite(9,LOW);

count = count +1; }

But , when I try "while(count <= 40000)" , it does not stop counting.

That´s all.

Thanks