Arduino (if) statement

Field & Cluster
Design, Production & Repair Architecture and Construction Engineering Manufacturing
Equipment/Materials Needed


Arduino
Leads
Potentiometer
Red LED

if
Description


Allow you the opportunity to code your programs to branch into different directions depending on values that you are reading from sensors.

Badge Completion Requirements

Developing "If" Statements

In many real-world applications, you want your programs to branch into different directions depending on values that you are reading from sensors. For such cases, you need to use IF statements. IF statements allow you to do different things depending on conditions. 

Please gather the following equipment:

Leads

Arduino

Potentiometer

Red LED

Please follow along with Mr. McWhorter in developing if statements. 

Prompt

Please design, develop, and code the circuit using 3 LED's (green, yellow, and red) 

Code for the following parameters:

green on 1-3 volts--off 3.1 volts

yellow on  3.1 volts--off 4.0 volts

red on 4.1 volts 

Explain the use of ||, &&, ==, and != in coding clauses 

Please develop and submit a presentation demonstrating your understanding and skill of developing "if" statements, using || "or", and && "and" statements. Please include the above "prompts" in your presentation