specific reading and thus provide feedback to the Arduino UNO board. There are two main sensor types: analog and digital. We will see the digital ones. example SENSORS, use of IF Remembering: if w want to read a digital input in Arduino, it is necessary to declare the input pin through pinMode(#pin, INPUT); in void setup(), and when we need to read the pin we use te statement digitalRead (#pin); in the void loop ()
Now that we have the sensor reading, it is necessary to add
a decision making statement, this is known as control structures. CONDITIONAL STRUCTURE: IF
The block “if” is used to check if a certain condition is
true or not.
If the condition is TRUE, the instructions inside block
“if” are executed
If the condition is not met, it will skip all the instructions
inside “if” CHALLENGE 5 Thank you aidee.munoz@tecmilenio.mx