Hey everyone, my group needs help on our code for our capstone project in a class. It’s a Phone Checker that uses distance sensors to detect whether there is a phone or not,
What I want the program to do is to go systematically to each pocket and record whether there is a phone in there using the first distance sensors with the use of lists in a grid pattern. It will use three lists in total, a x coordinate list for the second distance sensors, a y coordinate list for the third sensor, and a name list to correspond to each pocket so that it sends out a list of names to the Brain’s screen and controller’s screen to tell the teacher who has their phone and who doesn’t.
The only problem is that the distance sensors aren’t working, like they are detecting distances that are absurdly further than they should be. I have images of our code, the project, and a view of what is the problem.
This image bellow this shows you what the problem is, the first row on the brain’s screen is the distance between machine and pockets,
The second row is the distance between the left distance sensor on the large gear box to the distance sensor that reads the distance between the machine and pockets,
and the third row is the distance between the middle row that moves up and down to the paper on the bottom
it reads 938mm, 478mm, and 336mm
The first and third are absurdly wrong because the distance between the machine and pockets is around 120mm, and the distance between the movable row to the paper is much less than 336, like 100mm.
Like I said in the beginning, the distance sensors aren’t working, they are detecting distances that are absurdly further than they should be and when i was testing it but once I restart the Brain it fixes some of the distance senors to the measure the correct distances one BUT the third one which after it’s close to the paper, it jumps from 100mm to >800mm.
Any help is appreciated for me and my group!








