sampleprojects

Sample Projects
Listed here are a variety of example projects incorporating one or more of the prevasive computing technologies covered in the class. These projects are smaller in scope than what you'll need to do for the class--many were completed in just a few days--but you can use them as examples, foundations, or inspiration for your own project.

Contents

 * Shy Roomba** //arduino, create//
 * Roomba Kart** //wiimote, create//
 * Blender Kinect** //kinect, openni//
 * Roombot** //web apps, create//

Shy Roomba
The Shy Roomba will drive around a room at random and looking for a light gradient (from light to dark). It will then attempt to find the darkest spot it can, and stay there. This project makes use of the Arduino to enhance the Create's capabilities by providing additional sensors (photoresistors) and controlling it in real time.

iRobot Create Arduino + USB cable Breadboard 4x Photoresistors 4x 10 kΩ Resistors Wires
 * Materials**

[|Project Package] Arduino IDE Roomba library for Arduino, obtainable [|here].
 * Software:**

See the wiring diagram included in the project package. Place the four photoresistors on the front, back, left and right of the Create as labeled. The transistor is needed to amplify the signal on the Create's TXD pin. The Create's TXD does not spike high enough (5V) for the Arduino's serial decoder to register it. Note: Most PNP transistors can be used in place of the one specified in the circuit diagram.
 * Wiring**

The Arduino sketch for the project can be found in the project package. Upload it to the Arduino before plugging it into the Create, and remove the USB cable before starting the Create to prevent conflicts in the Arduino's serial output trying to print to both the computer and the Create.
 * Code**

After everything is wired up and plugged in, turn on the Create. A few seconds after booting, it will run the program. Note: Make sure the transistor is in the correct orientation. If improperly inserted, it can heat up and melt through the breadboard while the Create is powered on (it will not prevent the Create from moving). Not all transistors have the same pin layout; make sure to check your transistor's documentation (easily found online by typing in the model number appearing on the case).
 * Running the Project**

Roomba Kart
Roomba Kart controls a Create with a Wiimote (held together with Python), and demonstrates the use of the Wiimote as well as use of a Create via a bluetooth connection. Everything is written in Python.

Wiimote iRobot Create Bluetooth Access Module for Create Bluetooth-capable computer
 * Materials**

[|Project Package] (includes Wiiuse/Pywii)
 * Software**

To connect the Create to the computer, plug the BAM into its cargo port and power it on. Then, pair the BAM with your computer (it will show up as "Element Serial," and the passcode is 0000). To connect the Wiimote, hold down the 1 and 2 buttons simultaneously. While doing so, pair the Wiimote to your computer (it should appear as RVL-CNT-01 and does not require a passcode).
 * Wiring**

Roombadriving.py, found in the project package, contains all the code for this example.
 * Code**

Run roombadriving.py. You can now control the Create with the Wiimote. The A button zeros the Wiimote, the + and - buttons adjust the dead zone, and the 1 button toggles driving on and off (you will need to press this once you've zeroed the Wiimote and set your dead zone to start driving). Tilt the Wiimote forwards and backwards to make the Create accelerate and reverse, and tilt it to the sides to make the Create turn. If you run into a wall, the Wiimote will rumble.
 * Running the Project**

Blender Kinect
The Blender Kinect project demonstrates the use of OpenNI generated skeleton data within a Python script. In this case, the script uses joint coordinates to move shapes in the Blender 3D editing application, creating a virtual representation of the user.

Xbox Kinect Kinect power/USB adapter Computer
 * Materials**

[|Project Package] OpenNI (follow these instructions and be sure to include Python libraries and the Windows or Linux demo files) [|Blender 2.49]
 * Software**

Plug the Kinect into the adapter and plug the adapter into a USB port.
 * Wiring**

The script is called forcepull.py. It will also show up in Blender when you open the file. You can run the script in Blender by mousing over/clicking the script window and pressing Alt+P.
 * Code**

Before running the project, you will need to copy _module.pyd, module.py, and SamplesConfig2.xml from the OpenNI Kinect module folder into the project folder. You can then launch Blender and open the project. To run the script, press Alt-P while your mouse is over the script window in Blender.
 * Running the project**

Roombot: Telepresence Robot
This project has its own page: View details »