Pick to Light system with PIR sensors

Hello everyone,

I am working on a project and I need some help. I want to create a low cost pick to light prototype using PIR sensors and Arduino.

Two bins, provided with a PIR sensor each one.
A green led is turned on, to indicate where one should enter their hand. Then a button clicked and the sensor detect if it's the right bin. If it's confirmed, the led turns off. If it's not another red led turns on.

I have created my own script, but I don't know how to join all functions in one single script.

Thank you a lot for helping

I moved your topic to an appropriate forum category @camillem.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Please, post your drawing and sketch.

Verify your wiring of all devices, especially power. I am certain you will find the issue.

The difference between Wokwi and Live is the nature of electricity, especially connections, which involve human interaction. A wire will never "make" an error. The live version is doing exactly what you made it do. Wokwi covers up human mistakes.

I see. Thank you for you time.
I tested all components and wires one by one in vain. I will try again with power supply. It would be unstable, I guess.

Start with just the ESP32... does it work alone? Then add the pushbutton, and make it work. Then add more devices and wiring in small steps, verifying each step... and use EXTERNAL POWER, do not use the ESP32 as a power supply.

I will. Thank you so much.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.