[go: up one dir, main page]

0% found this document useful (0 votes)
14 views3 pages

Sensor LDR

Como lê ldr arduino

Uploaded by

claudio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Sensor LDR

Como lê ldr arduino

Uploaded by

claudio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Na LDR (Light Dependent Resistor), also

known as a photoresistor, is a component


that changes its resistance based on the
amount of light it is exposed to. In low light
conditions, its resistance is high, and in
bright light, its resistance is low. Here’s a
simple overview of how to use na LDR in
a basic circuit:

### Components Needed:


1. LDR
2. Resistor (typically between 1kΩ and 10kΩ)
3. Breadboard (optional)
4. Microcontroller (like Arduino) or a simple LED for output
5. Power supply (like a battery or the power from the
microcontroller)

### Basic Wiring:


1. **Connect one terminal of the LDR** to the positive terminal of
the power supply (Vcc).
2. **Connect the other terminal of the LDR** to a resistor ®, and
then connect the other end of the resistor to the ground (GND).
3. **The junction point** between the LDR and resistor can be
connected to a microcontroller analog input pin to read the light
levels, or directly to na output like na LED for basic functionality.
### Basic Code Example (for Arduino):
Here’s a simple example to read the value from na LDR using na
Arduino:

```cpp
Const int LDR_PIN = A0; // LDR connected to analog pin A0
Int sensorValue = 0;

Void setup() {
Serial.begin(9600); // Initialize serial communication
}

Void loop() {
sensorValue = analogRead(LDR_PIN); // Read the input on LDR
pin
Serial.println(sensorValue); // Print the value to the Serial Monitor
Delay(1000); // Wait for a second
}
```

### Applications:
- Automatic street lighting systems
- Light-sensitive alarms
- Solar garden lights

If you need more specific information or guidance on a project


involving na LDR, feel free to ask!
Esta mensagem foi gerada por Nova – baixe-a gratuitamente:

2
https://novaappai.page.link/FGxee8AwT6iyPo4o6

You might also like