Skip to main content
deleted 67 characters in body
Source Link
Rudy
  • 993
  • 5
  • 12

There are different ways to accomplish the same thing.

The condition is a flag, or a read port.

if(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds. Depending on what you are doing it may or may not be relevant.

There are different ways to accomplish the same thing.

The condition is a flag, or a read port.

if(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds.

There are different ways to accomplish the same thing.

The condition is a flag, or a read port.

if(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds. Depending on what you are doing it may or may not be relevant.

deleted 67 characters in body
Source Link
Rudy
  • 993
  • 5
  • 12

There are different ways to accomplish the same thing.

The condition is a flag, or a read port.

if(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds.

I suggest going through the examples provided with the Arduino IDE.

There are different ways to accomplish the same thing.

The condition is a flag, or a read port.

if(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds.

I suggest going through the examples provided with the Arduino IDE.

There are different ways to accomplish the same thing.

The condition is a flag, or a read port.

if(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds.

deleted 6 characters in body
Source Link
Rudy
  • 993
  • 5
  • 12

There are different ways to accomplish the same thing. While is one of them.

while(condition){
  // statement(s)
}

The condition is a flag, or a read port.

whileif(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds.

I suggest going through the examples provided with the Arduino IDE.

There are different ways to accomplish the same thing. While is one of them.

while(condition){
  // statement(s)
}

The condition is a flag, or a read port.

while(digitalRead(inPin))
     {
     // Your first code here.
     }
else {
     // second code
    }

I suggest going through the examples provided with the Arduino IDE.

There are different ways to accomplish the same thing.

The condition is a flag, or a read port.

if(digitalRead(inPin))
     {
     // Your first code here.
     }
else 
     {
     // second code
     }

Switch contacts will bounce when opening or closing. You may want to consider that. Usually it is stable within 10 milliseconds.

I suggest going through the examples provided with the Arduino IDE.

Source Link
Rudy
  • 993
  • 5
  • 12
Loading