This tutorial shows how to connect a button to the TurtleBot power and gyro board.
Step #1: Next
- You will need:
- Giant button
- 10K Resistor
- TurtleBot Power Board
- A TurtleBot might be of use as well
Step #2: Next
- Solder one end of the 10K resistor to Pin 8 (5V) on the DB-25 connector of the TurtleBot power board.
Step #3: Next
- Solder one of the wires onto Pin 14 (Ground) of the DB-25 connector on TurtleBot Power Board. (white wire in picture)
- Solder the other wire onto Pin 6 (Digital Input 3) of the DB-25 connector on TurtleBot Power Board. (green wire in picture).
- Connect the other end of the 10K resistor to the wire attached to Pin 6. (green wire in picture)
Step #4: Next
- Solder the two wires onto the switch.
- Attach the button to your robot.
- Try out this script on your ROS-configured TurtleBot laptop. This script makes the robot drive forward, pressing the button toggles motion on or off.