Hi there,
I am trying to mockup a project where I use an ITTINY85 to read the value of a photoresistor.
I followed the steps and validated with many sources but it still does not work
I checked mainly the 2 following posts:
Project Hub
Instructables
And that is only 2 of the many sources, I found many others that seem to go the exact same way.
I am using tinkercad to do the preliminary tests before actually trying in the real world.
Attached to this post, you can find a screenshot of the setup and here is the simple code I am using:
void setup()
{
pinMode(PB3, INPUT);
pinMode(PB0, OUTPUT);
}
void loop()
{
int value = analogRead(PB3);
digitalWrite(PB0, value);
delay(250);
}
I know that I'll need to do something to get the led to properly work in this setup but the thinkercad allows me to add break points and change the "light intensity" seen by the photoresistor and no matter what I do, the value I get in the "value" variable is always the same.
Is there something obvious that I do not see?
Can someone tell me where I'm getting this wrong?
Extra notes:
The led resistor has a value of 220ohm and the photoresistor's resistor has a value of 10 Kohm
The whole circuit is powered using a 3v CR2032.
I could potentially share the thinkercad "project" if need be but I'm not too sure how to do it.
Thanks,