What's Brewing: Robo-Dog Toy

 Hey Everybody!

Introducing the brand new toy, an interactive robot that you can play with your friends.

4 people.

4 Legs.

One goal: make the robot walk forward. Collaborate to see what legs you should move and when you should move them. In this example, the robot happens to be a dog, but you can make yours be whatever you want to be. Be an individual. 

Hardware Required

4 Servo Motors
A low to the ground body structure, two small planks of wood.
4 Legs
1 Arduino Uno

Libraries Used

Code Used
https://github.com/blueberrybum/WalkingRobot

Early Prototype Videos
https://vimeo.com/90483603
https://vimeo.com/90483603

Previous Products

photo 3.JPG

So, Simply

Step 1:

Hook up your servos to a base, preferably a nicely balanced one.

Step 2:

Hook up a leg to each servo and mack sure that the robot can stand properly with one leg in the air, and another (on the other side) off center. This is necessary for the robot to be able to walk correctly in the future.

Step 3: 

Attach the arduino and hook each servo up to whichever pins you want. Make sure you keep track of which leg is connected to which pin. This will be necessary when it comes time to code.

Step 4:

Boot up a spacebrew boolean example in processing and choose your publisher name. Also add four subscribers for each leg. You can name them whatever you want but, if you're going to use the code above, go back_left, back_right, front_left, and front_right.

Step 5:

Start up a buttonPress example in spacebrew as well. You can name the publisher whatever you want, but we are going to be connecting that to the four subscribers eventually.

Step 6: In the initial Spacebrew example, we will call it output, move to the onBoolean message and type out your if statements. When the button is pressed the value will equal true, so if you want a specific leg to move without any of the others the code will look something like if(name.equals"back_left" && value = true)

After that you can put in whatever value you want for the servo.

Step 7:

Fortify your robot to make sure the arduino doesn't slide off, boot up your programs, connect the input publisher to one of the output subscribers, and try it out!

Documentation

Using Processing and Arduino Firmata, I hooked it up to Spacebrew and set up a button press system that controlled individual servos to move from 0-180 each time the button was clicked. Four subscribers were made, each one with a different color to represent which leg was being pressed and it was coded into javascript so that it could be used on your phone.

I started with the basic button press examples from Spacebrew and then tweaked them to what I needed after uploading the Arduino Servo Firmata to the board. I hooked up each servo motor to pins 6,7,9, and 11, and then specified each one in the code as a back_left, or front_right. Processing was told that if the subscriber was any of these legs, it would move to appropriate one as many degrees as specified. I also worked with the Minim library in processing to make sure that whenever a certain leg would move, the robot would bark a different sounding bark.

The reason that I decided to build this project is because I feel that in the world of online gaming, there aren't as many games that you can play with your friends all in the room. While it is a spacebrew project that you use on your phone, all of you have to be in the same room, looking at the robot, and collaborate to make sure that you are making it walk correctly. When it doesn't walk perfectly, it is still funny and therefore still a pleasant experience to have with your friends. Even just on my own, the robot was fun to play with and the aesthetic that he had at the end, looking more like a puppy, made him more fun to play with.

There were a few obstacles I faced on the way down this path. The first was figuring out why the legs wouldn't move simultaneously when I used one Firmata sketch, while they did with the other. There was no solid answer that I came across, but I manage to find my way around it somehow. The code is set up as a boolean value where the button press equals true. If the button press value equals true and the subscriber name is equal to the leg used, then only that specific leg will move. That is how we will have four people using it at the same time.