This is like a button that is pushed when the switch is level.
Sample Code
Arduino (C/C++ Programming)
(ino)
Useful Links
(wiki.seeed.cc)