Hello Forum.
I have been searching for a couple of hours now and still cant find an answer.
I am a newbie to microcontrollers and have question on analogue reading. I have an ATTiny85 that I am programming in C (not using Arduino libraries). I have successfully programmed and blown to the chip the "hello world" of microcontrollers (blinking LED). I did not use any bootloader or firmware, I just programmed the chip "out the box".
Now, I want to read the value of a LDR to decide whether to switch the LED on. However, I am unsure how you do this in code. As I said, I am a newbie, and I not too sure need a firmware / bootloader or whether I can do this out the box as I did the blinking LED. And if I can do the "out the box", could anyone supply or point to an example?
Thank you very much for your time,
Harold Clements
I have been searching for a couple of hours now and still cant find an answer.
I am a newbie to microcontrollers and have question on analogue reading. I have an ATTiny85 that I am programming in C (not using Arduino libraries). I have successfully programmed and blown to the chip the "hello world" of microcontrollers (blinking LED). I did not use any bootloader or firmware, I just programmed the chip "out the box".
Now, I want to read the value of a LDR to decide whether to switch the LED on. However, I am unsure how you do this in code. As I said, I am a newbie, and I not too sure need a firmware / bootloader or whether I can do this out the box as I did the blinking LED. And if I can do the "out the box", could anyone supply or point to an example?
Thank you very much for your time,
Harold Clements