Hi folks! This is my first time building with Arduino, and I only have some knowledge of building/programming through Vex and Robot C. So I appreciate your help. My step sister wanted to build a robot for Christmas, so I bought her the Robot Chassis Kit and we've put it together.
We have a Leonardo Board on it and a Motor Shield Board. We have successfully hooked up the external battery power supply and the motors to the boards.
I have bought this limit switch. Where on the Leonardo do I connect it? I know it will be a digital input. Do I connect the Comm prong of the switch to any digital port (1-13)? Do I connect NO on the switch to something on the board?
Thanks for those pictures, i always wondered what a leonardo looks like, and a microswitch!
Use the common and normally open terminals on the switch. Wire them to a digital input and ground, either way around. To read the switch, set the digital input to INPUT_PULLUP. Normally the input will read HIGH but will read LOW when the switch is pressed.