LDR is Light Dependent Resistor, no light = high resistance, with light low resistor. Depending on the position of the LDR baising, you can make LED turn brighter when it is darker, or vice versa.
We are using a photoresistor (which is a LDR as you described it). You can set up a LED voltage in that way - LDR in series to the LED, but our idea is using PWM to control the brightness :) Just practicing some of the PIC's features like ADC and PWM.
Oh, so that's why. :D Keep up the study, so will I. Haven't got the the PWM yet :(. Can you send me the code or any code you working write for PIC. I want to see how other people structured their code, whether in assembly or c++ and how to define, call subroutine, label etc... Thanks
What is your e-mail? I will send you sources, but have in mind they are written for SDCC (Small Device C Compiler) which syntax is kinda different from the most popular PIC C compilers.
LDR is Light Dependent Resistor, no light = high resistance, with light low resistor. Depending on the position of the LDR baising, you can make LED turn brighter when it is darker, or vice versa.
naaglugyaaj 3 years ago
Oh, yes, ofcourse :)
We are using a photoresistor (which is a LDR as you described it). You can set up a LED voltage in that way - LDR in series to the LED, but our idea is using PWM to control the brightness :) Just practicing some of the PIC's features like ADC and PWM.
ivanatora 3 years ago
Oh, so that's why. :D Keep up the study, so will I. Haven't got the the PWM yet :(. Can you send me the code or any code you working write for PIC. I want to see how other people structured their code, whether in assembly or c++ and how to define, call subroutine, label etc... Thanks
naaglugyaaj 3 years ago
What is your e-mail? I will send you sources, but have in mind they are written for SDCC (Small Device C Compiler) which syntax is kinda different from the most popular PIC C compilers.
ivanatora 3 years ago
can it be done with just a LDR sensor, a NPN, a few current limiting resistoor, and a LED, no?
NaagLugYaajUaSi 3 years ago
What is LDR sensor and what is your general idea?
ivanatora 3 years ago