Box man: Body remote robot car

–final video

This is Peggy and Hank’s project 3. Our concept is using player’s body gesture to control a robot worker to solving a box man puzzle. Originally, we started from thinking about how to use wireless technology to connect two objects more than doing a game. For instance, Hank’s wife always want a coffee machine that can help her cook coffee every morning when she gets up starting to wash her face; and I always want to do something for couples in long distance relationship (maybe two umbrellas, can project your lover’s external environment inside your umbrella. Or two bangles, can transfer your pulse data into some other things and send to your lover’s bangle.) However, we thought those are not fun enough. So we change the idea to a game. (Hank dreams for the robot car. And I like to solve puzzle. So we combined our ideas together.)

Step 1: build the robot In the process, the biggest problem was this robot car was hard for us to be programmed. We didn’t know where we could start. Officially, it can be programmed by C++. But we know nothing about C++. So we did a lot of research to figure out how can we code in Arduino environment. And then, we could control it’s speed and direction.

–forward: motors.setSpeeds(motorSpeed,motorSpeed);

–backward: motors.setSpeeds(-motorSpeed,-motorSpeed);

–right: motors.setSpeeds(motorSpeed,-motorSpeed);

–left: motors.setSpeeds(-motorSpeed,motorSpeed);

–controlled by the buttons on the car


  unsigned char button = buttons.waitForPress(BUTTON_A | BUTTON_B | BUTTON_C);

  if (button == BUTTON_A){

  if (button == BUTTON_C){

  if(button == BUTTON_B){


  motors.setSpeeds(motorSpeed, motorSpeed);

Next, we studied with the pin map for 3pi robot car and find out which pin we can use. (only 3 free pin available). –buttons controll:

And then, we tried to control the car wirelessly.

–Xbee talk

–Wireless button

–Keyboard control: read data from processing


//Arduino1:get data from processing, and send data through xbee

//Arduino2:the car, receive data from xbee


Step 2: connect Kinect

–The code to read the kinect:


–Arduino:read from Processing

–Robot car

And then, we want to code to control the angle for the car to make sure every time the car will turn 90 degree. We choose to change the code on arduino1. Here is the code:


Step3 build the maze The originally design should be like this: But when the car push the box, we can not make sure the car push the centre of the box, which result in the box will be deviated the path and the car can not keep moving vertically or horizontally. Besides, more blocks in the maze is easier to block the signal between Xbees. So I modify the maze into this: And add a board on the car (can help to push). After all red boxes are put into the target places, the leds will turned on, and a win sound effect will be there.

Step4: Display When I tried to play this game before we do the presentation, I realize I have to keep looking my laptop to see the background change, in order to make sure my gesture. Thus, I couldn’t focus on the maze and control the robot better. Kate and Nick suggested me to set up a projector to project the background color on the maze, so that I don’t need to pay attention to my laptop. And the game can be more smooth.

–maze with projector

Comments are closed.