Wiring a push button

One of the most simple of all input devices is a push button. Two metallic strips contact (for a Normally Open) or release (for a Normally Closed) on a physical push, allowing a signal to be used when specific actions must be taken. For example, a program can wait for a user input before continuing, or different actions can be taken if a button is pushed or not. Connecting a push button to a robot simply involves wiring the two contacts to a digital input, which is usually marked as DI0, DI1, DI2... for digital input 0, 1, 2.. The input will have two terminals, allowing direct connection without any further hardware like the usual breadboards used when prototyping with microcontrollers, and as simple mechanical buttons are not polarised they can be connected in any direction. Once wired in, it should be possible to monitor the input state on the robot's teach pendant and see it changing when pushing the button.