Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Archive the resource

  • Loading branch information
lawsie committed May 2, 2017
1 parent d1745b8 commit 2d78fa0b103bfeddb75189c596d2691f620419f1
Showing with 17 additions and 13 deletions.
  1. +5 −4 README.md
  2. +12 −9 worksheet.md
@@ -1,8 +1,11 @@
# Build a Wiimote-controlled Robot Butler!

**This is an archived resource.** The repo will remain available but the resource will no longer be maintained or updated. Some or all parts of the resource may no longer work. To see our latest resources, please visit [raspberrypi.org](http://www.raspberrypi.org).


![](cover.png)

This guide shows you how to build and control a Raspberry Pi-powered robot with a Nintendo Wiimote.
This guide shows you how to build and control a Raspberry Pi-powered robot with a Nintendo Wiimote.

## Requirements

@@ -13,7 +16,7 @@ As well as a Raspberry Pi with an SD card loaded with Raspbian, you'll also need
- Robot chassis - [Rover 5](http://proto-pic.co.uk/dagu-rover-5-tracked-chassis-with-encoders/). This includes 2 motors and a battery pack.
- Motor controller, such as the [Ryanteck motor controller](http://ryanteck.uk/rtk-000-001/)
- Input device - Nintendo Wiimote
- Bluetooth dongle to talk to the Wiimote
- Bluetooth dongle to talk to the Wiimote
- USB rechargeable battery to power the Raspberry Pi like [this one from the PiHut](http://thepihut.com/products/portable-power-pack-for-the-raspberry-pi)

### Software
@@ -38,5 +41,3 @@ Unless otherwise specified, everything in this repository is covered by the foll
***Robo Butler*** by the [Raspberry Pi Foundation](http://www.raspberrypi.org) is licensed under a [Creative Commons Attribution 4.0 International Licence](http://creativecommons.org/licenses/by-sa/4.0/).

Based on a work at https://github.com/raspberrypilearning/robobutler


@@ -1,4 +1,7 @@
# Robobutler

**This is an archived resource.** The repo will remain available but the resource will no longer be maintained or updated. Some or all parts of the resource may no longer work. To see our latest resources, please visit [raspberrypi.org](http://www.raspberrypi.org).

Build and control a Raspberry Pi-powered robot with a Nintendo Wiimote.

## Getting started
@@ -11,7 +14,7 @@ It's always good to break down projects into chunks, as it makes it much easier
3. Write the final program
4. Build your robot's body
4. Serve a nice cup of tea to your mum.

## Connect the motor board to the Pi

Put the board on the Raspberry Pi GPIO pins. It should look like this:
@@ -22,21 +25,21 @@ Put the board on the Raspberry Pi GPIO pins. It should look like this:

Connect one motor to the blue connector marked J3/M1, using wires stripped at each end or male-male header cables. Connect the other motor to J2/M2. It does not matter which way round you connect each individual motor at this point (if a motor turns the wrong way then just swap the wires around) but you should have something like this:

![Ryanteck board wired up to motors](images/connectors-small.png)
![Ryanteck board wired up to motors](images/connectors-small.png)

Tape the connections between the motor wires and the headers, to stop them coming loose.

Finally, connect the battery pack to the motor board as shown above. Here's what you should have at this point:

![Raspberry Pi hooked up to robot](images/robobutler-connected-small.png)
![Raspberry Pi hooked up to robot](images/robobutler-connected-small.png)

You now have a battery pack connected to the robot's motors via the motor control board. We will use the Raspberry Pi to control how and when the motors receive power.
You now have a battery pack connected to the robot's motors via the motor control board. We will use the Raspberry Pi to control how and when the motors receive power.

## Test the motors

The Ryanteck board is controlled using pins 17, 18, 22 and 23 of Raspberry Pi [GPIO] . If you set pin 17 high, motor one goes clockwise, whereas pin 18 high turns it anticlockwise. Pins 22 and 23 control motor 2.

Let's write a small Python script to test that everything's working.
Let's write a small Python script to test that everything's working.

At the command line type `nano test_motors.py`. Type in the following [program](code/test_motors.py):

@@ -56,7 +59,7 @@ for pin in pins:
time.sleep(0.5)
io.output(pin, 0)
```
```

Press `CTRL-o` and then `Enter` to save
Press `CTRL-x` to exit to the command line
@@ -91,10 +94,10 @@ Now you have a remote-controlled rover, which is completely fantastic, but he lo

![photo of finished robot](images/robobutler.jpg)

## What next?
## What next?

- Could you automatically run the Python script on startup?
- How about spoken cues so that you know when to connect the Wiimote?
- Could you automatically run the Python script on startup?
- How about spoken cues so that you know when to connect the Wiimote?
- Could you make your robot speak?

[GPIO]: http://www.raspberrypi.org/documentation/usage/gpio/README.md

0 comments on commit 2d78fa0

Please sign in to comment.
You can’t perform that action at this time.