Sensor Limit?

Does anyone know if there is a limit on the number of sensors you use, or if there even is a limit?

There’s no limit on sensors, just how many you can plug into the cortex.

Are you allowed to use y-cables in order to increase that number?

Ya cables are allowed. Another thing is putting sensors in different ports. Vexu team GOAT used so many digital ports we ran several limit switches off of analog ports.

Physically you might be able to use y cables to connect more sensors, but you will have no way to reference those sensors in your code. The cortex can get 1 reading per port, and the ports get it from the sensor. Therefore, you will not be able to actually use 2 sensors y cabled in to one port, as the cortex will not be able to read both of them. Because of this the limit to how many sensors just is how many you can plug into the cortex. Please correct me if I’m wrong, but I’m pretty sure this is it.

Well, in the case of limit and bumper switches, you can use a y-cable. You will not know which one triggered, but that one or more tripped it. As Tabor indicated, it is a useful technique when you run out of ports.

Thank you, I wasn’t thinking about those sensors. What did Tabor post? I don’t see anything from him.

Uhm, it’s 3 posts above yours.

I’ve done the multiple bumper / micro switches off Y cables. We used it to get the robot up against the goal, there was one on either side of the front bumper, that gave us the ability to go with either bumper being hit.

There’s no limit on how many sensors you can use, as long as other rules are not violated. However, you only have so many ports on your Cortex, so you have to plan that out wisely. You can use y-cables to connect more sensors to the same port, such as using multiple bump switches for a single trigger, or as others have said, run the touch switches off the analog ports.