Identify the photoresistor, LED, resistors, and wires connected to the Arduino in the Tinkercad Circuits workplane.ĭrag an Arduino Uno and breadboard from the components panel to the workplane, next to the existing circuit.Ĭonnect breadboard power (+) and ground (-) rails to Arduino 5V and ground (GND), respectively, by clicking to create wires.Įxtend power and ground rails to their respective buses on the opposite edge of the breadboard (optional for this circuit but good common practice). To follow along, load up a new Tinkercad Circuits window and build your own version of this circuit along side the sample.
In this step, you will build your own version of this circuit along side the sample in the workplane. It can be useful to look at a free-wired version of this sample circuit for comparison, pictured. Take a look at the breadboard circuit pictured. It's perfect for learning, teaching, and prototyping.
Tinkercad Circuits is a free browser-based program that lets you build and simulate circuits. You can even view this lesson from within Tinkercad (free login required)! Explore the sample circuit and build your own right next to it. You can follow along virtually using Tinkercad Circuits. To optionally build the physical circuit, gather up your Arduino Uno board, USB cable, solderless breadboard, an LED, resistors (220 ohm and 4.7k ohm), photoresistor, and breadboard wires. In this lesson, you'll build this simulated circuit yourself along side the sample. Įxplore the sample circuit embedded here in the workplane by clicking Start Simulation and clicking on the photoresistor (brown oval with squiggly line down the middle), then drag the brightness slider to adjust the simulated light input.
Remember that Arduino's analog inputs (pins marked A0-A6) can detect a gradually changing electrical signal, and translates that signal into a number between. So far you've already learned to control LEDs with Arduino's analog output, and to read a potentiometer, which is another type of variable resistor, so we'll build on those skills in this lesson. It's also called an LDR (light-dependent resistor).
Let's learn how to read a photoresistor, a light-sensitive type of variable resistor, using Arduino's Analog Input.