================= == Conditionals ================ if( condition ) { //Do this } else { //Or do this other stuff } If (condition) evaluates to TRUE (ex 100 > 4) The program will execute the first block of code and skip the other. Otherwise if the (condition) is false it will run the second block of code ans skip the first. Example Lets say we have a potentiometer that sets our robot to either of 2 modes. "SAFE" and "TAKE OVER THE WORLD" Also, lets assume I put the potentiometer's wiper to pin A5 and the robots red eye on pin 3 (thats the evil pin) void setup(){ pinMode(A5, INPUT); } void loop(){ if (analogRead(A5) > 500){ digitalWrite(3, LOW); } else { digitalWrite(3, HIGH); delay(1000); digitalWrite(3, LOW); delay(1000); digitalWrite(3, HIGH); } } ================================== == A quick note about pinMode All arduinos have hardware built in that can either READ or WRITE to pins. You have to set the hardware BEFORE you can do either of those. If you don't you can get what is called FLOATING PINS. These are pins that havn't had their mode set and as a result to random things. For example the analog pins will just read from the last pin that was set to INPUT pinMode(A3, INPUT); analogRead(A3); // Is fine becuse we set the mode analogRead(A4); //Will give us whatever is on pin A3 because we didn't set the hardware ================================== ======================== == If Blocks ====================== If blocks can have multiple conditions and options. if (condition1 ) { } else if (condition2 ) { } else if (condition3 ) { } else { } You can have as many or as few "else if"s as you want. However, you can only have 1 "if" and at most 1 "else" =========================== == Your mission ========================== Build the circuit to have 1 potentiometer and 3 LED lights. Write the code to have 3 modes that will be set by 3 different conditions based on the potentiometer values. Test the system to make sure it all works. BONUS: Add more states and LEDs because they are shiny!