Introduction: Pizza Rat
After seeing the video of the pizza rat in NYC not so long ago, I thought I would make one . It ended up being a gift for my daughter and it used up an used piece of pizza.
I had a robotic car that used a Picaxe and a couple of motors that I no longer needed. So I repurposed them to make my pizza rat.
So all I needed were:
1. a Rat - I found on the internet for about 5.00
2. Picaxe 28 which I already had
3. Wheels and motors from previous project
4. battery holder
5. 4 double A batteries
6.An on/off switch
7. some misc wires
Step 1: Video of It in Action
Step 2: The Build
So using a small 6 inch piece of wood , I attached the battery holder to one side and the PIcaxe to the other. I attached the motors with double sided tape and then used a zip tie to further hold in place.
I hot glued the ends of 2 pieces of fairly rigid wire to the top of the wood and the other ends I secured to the bottom of the rat with hot glue and a couple of small screws.
I included a couple pieces of wire that are shaped like a C over the wheels. This keeps the pizza from resting on the wheels .
Step 3: The Electronics
Not much to this:
Power and Ground are attached as shown in photo. Likewise the motors are attached as shown.
Step 4: The Code
Below is the code I used.
When both wheels are turning , it tended to go in circles so I tried to compensate by stopping there faster wheel for a short time. There may be a better way to do this.
' idea: turn on and it will derag the pizza backwards '' wait 2 seconds to put the rat down pause 2000
main: ' the main loop
' back up both wheels turning ' low 5 : low 6 : high 4 : high 7
low 6 high 7 high 5 low 4
' adjust turning by stopping fast wheel
low 4 high 5 low 6 low 7 pause 600