This sketch shown how to read a single switch with pull up resistor

Dependencies:   mbed

no such method: tip