So, I’m trying to figure out the programming for a light sensor. Granted that the programmer on my team also doesn’t know how to program one. I too am an amateur in programming. I’ve gotten the programming down it just won’t do the task. The program worked once when the robot was connected to the laptop and it was on top of the table. Where it then proceed to commit suicide and drive off the table. Its a little robot not really meant for anything other than driving fast. So, my problem is trying to do the task again without it killing the bot. Gracias
It’s a little hard to say much without seeing any code, without seeing how the robot is set up, and without seeing what the robot does to commit suicide. Here are a few thoughts without knowing those issues:
Ambient light levels (IR for the VEX EDR light sensor v. visible for the VEX IQ color sensor) can mess around with the sensor. If it only worked once and then ceased to with no changes to the robot, I would wonder about light levels.
I’ve seen a lot of robots lose the line by not checking frequently enough. For example, they’re following the right edge and don’t see the line so they need to veer left. They veer left so much that they’re off the other side of the line. They then check again and don’t see the line so it appears they’re still to the right and proceed to veer left even more.
I’ve seen issues similar to #2 above in the opposite way. They don’t turn sharp enough and so are never able to correct sufficiently when the line changes direction.
All of these issue can show up as working fine sometimes and not functioning at all other times. Since you comment about driving quickly, #2 and #3 could both potentially show up. And then there are other things like a wire getting disconnected, etc. But, as I said, it’s hard to figure out anything much without knowing more.
Its with a light sensor and I don’t have access to the code right now but the robot is a U train with three speed motors on each side and has a three to one gear ratio. The robot committed suicide by driving off a table unexpectedly. Thanks for the info though!!
Though you don’t have the code, do you have a video? (Especially different versions: working and not working.) There could be so many things going on, it’s so hard to say without seeing more. That’s why I was just throwing out common problems that I’ve seen showing up that cause behaviors like you described.
That makes sense but sadly I don’t have a video of the robot but I actually did find the thing that I was looking for. Which was the values of the light sensor. They come up when you plug in the robot into the laptop and it’s in debugger. But you can’t get to debugger without connecting the robot to the computer.
If you want to wirelessly debug you can use a wireless programming cable and connect that to your controller which is connected to your robot via vexnet. You could then open the debugger and read sensor values without being tethered to the robot.
Since you’re using the “light sensor” instead of the “line tracker,” how far is this mounted from the surface it’s driving on? If it’s too close, you’ll get a lot of shadowing and everything will look dark. That can potentially result in the robot not differentiating between the line and the rest of the surface. The line tracker gets around this by emitting IR and looking for reflection from what it provides.
Note: I wrote the wrong name above. The line tracker uses IR, while the light sensor uses visible light.
OK that makes sense thank you much!!
okay thanks that helpful