I'm making a project for the university, then I found some problems with coding of Arduino to the circuit with two pushbutton and one LDR sensor. My project is a blind controlled by pushbuttons, LDR sensor, and Alexa. When the sun rises the LDR sensor must detect it and start the opening of the blind. However, the pushbuttons must allow the open or close of the blind.
Can anyone help me? My code permits the pushbuttons works but when the LDR sensor detects the light it doesn't trigger the relay to activate the engine.
Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
Please post a schematic. Hand drawn, photographed and posted is fine.