The sorter sends everything to one side
The sensor threshold from QA is a starting number. Your lighting and your items will need a different cutoff.
The problem
The gate always dumps left, or always dumps right, no matter what you drop in the chute.
Words used here
- Threshold
- The number in the code that decides “this reading is dark/coloured enough to fire the gate.” It is not universal. QA tunes it on that bench, under that lamp.
Fix, in order
- 1
Open Serial Monitor at 9600 baud if the sketch prints analogRead. Drop a “left” item and a “right” item. Write down the two numbers. Put the threshold between them, not at the QA default.
- 2
Keep the sensor a fixed distance from the item. A hanging sensor that swings will read the room, not the object. Tape the mount.
- 3
Turn off auto-exposure surprises: do not mix a bright window and a dark corner on the same table. QA failures here were lighting, not the servo.
- 4
Confirm the servo actually travels both angles when you type them in a tiny test sketch (write(20) then write(90)). If it does not, fix the servo first using “My servo isn’t moving.”
Related builds
Also useful
Still stuck?
If you walked the steps and the mechanism still does not move, write to us. This is the fallback, not the first stop.
Contact support