Here is a video showing you how to write the program to make the LEDs work.
In this unit you will use an if....else... statement to turn on a red LED if the sensor reading is high and a green LED if the sensor is reading is low.
Here is the circuit to use:
Remember: Use short wires close to the breadboard wherever you can. It makes it way easier for you to wire it up correctly.
OK, I am assuming you have got the two LED responding to the sensor. What about trying to get a motor responding to a sensor. You could make the motor turn one way if the sensor is covered and turn the other way when it is uncovered. You will sort of have to combine stuff you learned about the sensor in this Unit with stuff that you learned about a reversible motor in Unit 6.
Here is a diagram showing how you could wire it up: