Page 2 of 2

Re: Light Sensor

Posted: Tue May 10, 2022 4:41 pm
by medelec35
which post has the code are you referring to:
Post 1 @ Sun May 08, 2022 3:04 pm
or post 2 Mon May 09, 2022 12:28 pm
?

Re: Light Sensor

Posted: Tue May 10, 2022 8:43 pm
by habba34
Monday 09 2022 12:28 pm code

Re: Light Sensor

Posted: Tue May 10, 2022 10:35 pm
by medelec35
That code was a quick way to test on hardware only.
even though the simulation only shows 1 LED, it will work with all 8 on hardware.
For both hardware and simulation, the Count within led_array properties should be changed from 1 to 8.
I have done that on the attached Flowchart.
Instead of the light sensor component, a Potentiometer can be used.
the LED array was used as that was already connected.
Alternatively, the value can be sent to an LCD if you have one.