
When the sensor is NOT pressed, it returns a value of 1 when it IS pressed, it returns a value of 0 (zero). Sensor Output: eas圜Įas圜 users take note: Eas圜 programming with VEX digital switches requires a little bit of backward thinking. It’s pretty straightforward and great for programmers just starting to use sensors. To program a robot using a bump sensor, one usually has a conditional statement, followed by some instructions: If sensorValue = 1, do this. When the button is pressed, the sensor returns a value of 1 when it’s not pressed, it gives a value of 0. Triggering it requires a reasonable amount of force, so don’t plan to use this for a movement that will lightly touch or graze its target object (see next for limit switches to do that). This item is screwed onto one part of the robot (often some part of the chassis) and when you hit something (like the field perimeter or a fixed field object) it says “Aha!” It falls into the category of “digital sensors,” meaning that it returns only two possible values: 1 or 0 (and must be plugged into one of the cortex “digital” ports). The bumper switch is a pretty basic in addition to being reliable and durable, it is easy to install and use.

The aim of this series is to help teams that are new to using sensors have an idea of what is available, and what they might like to use on their own robots.

This is the first of a series of posts that examines each VEX sensor.
