I need programming and interfacing guidance for driving two motors with motor driver l298(provotech ltd.) and 2 leds,2 ldr assembly with arduino uno(atmega 328) microcontroller.
DESCRIPTION:As LDR resistance goes low, the motors stop working.
I need programming and interfacing guidance for driving two motors with motor driver l298(provotech ltd.) and 2 leds,2 ldr assembly with arduino uno(atmega 328) microcontroller.
DESCRIPTION:As LDR resistance goes low, the motors stop working.
Can you tell me more about what you intend to do with this?
You need to connect the LDR in a potential divider. So a resistor from 5V to say A3, and the LDR from A3 to ground. You then read the value of A3. As A3 increases it shows light decreasing. You could also connect it the other way around in which case A3 increases with more light.
Decide your thresholds and turn the motor on or off on that basis.