1. v21
  2. punchingthecustard


punchingthecustard / instructions.txt


Install Processing on the laptop. You'll also need to install the Arduino Processing library -- this will implement the Firmata protocol.

You should now be able to open the punch_the_custard.pde file. You'll need to specify the correct COM port to talk to -- this can be found by opening up System Properties once the Arduino board is connected via USB -- you should be able to find a serial port in there, something like "COM5". 
You have to specify the correct COM port and the correct input pins in the Processing sketch. You'll also want to change the line "size(1280, 800);" at line 68 to specify the correct screen resolution for the screen you are using.

The ground pins (these are the paler wires, of which there are two -- it doesn not matter which way round these go) are connected to some sheets of aluminum foil. When playing, players must have one hand on the foil, and one hand free to punch. I found the wires would connect easily to the tin foil - I then taped it down to the table. I taped the more orangey, differently coloured wires to the inside and outside of the bowls with clear tape -- this wasn't entirely duarble, but worked fine. make sure to wipe down the inside of the bowl where the tape goes.

When starting the sketch, you press ctrl-shift-R to run it in fullscreen mode.

When mixing up custard, I found that suprisingly little water was needed -- less in volume than the amount of custard powder. I used Bird's Custard Powder -- not sure if this is UK only. It consistes almost entirely of cornflower. If you can't find any custard powder that's similar, I would just substitute corn flour. For more details, see : http://en.wikipedia.org/wiki/Non-newtonian_fluid#Oobleck and http://en.wikipedia.org/wiki/Bird%27s_Custard . I found I used between half a kilo and a kilo of custard powder for each bowl. Plastic bowls are also preferable, as my flatmate hurt her hand punching a Pyrex one. 

You'll want to mix the custard up pretty thick -- if it's too thin then it will be slopped by players over the table. Though it won't splash. As players play, the custard will get thicker and drier, so you may wish to top it up with a little water.

Running the game

The best way for people to wash thier hands is in a bucket of clean water. The custard rinses off easily, but smears if you try to use wet wipes.

To restart the game, you press "R". To start the game, you press Space. My usual speil goes like this : "Put one hand on the tin foil. With your other hand, punch the custard as many times as you can in a minute. When it says PUNCH ounch, when it says DON'T PUNCH don't punch. 3 - 2 - 1 - GO!" and press Space. They have to have one hand on the tin foil for their hits to register. 

The things you'll end up explaining are : The hit detection works because people complete a circuit from the tin foil to the custard -- they conduct electricity between it. Which mean, yes, you don't really have to punch, you can just tap it. The custard doesn't go everywhere because it is a non-Newtonian (or more accurately thixotropic) fluid -- this means that when it has force applied it acts like a solid, and when there's not it flows. Ketchup is an example of something that behaves in the opposite way. They once ran over a pool of custard on Brainiac, you can see clips on youtube. Also, no, you can't eat it, people have put their hands in it.

If the setup starts failing, it's likely that one of the wires has come out of the breadboard, or has lifted out of the custard. Or that the wire is no longer in contact with the foil. Occasionally it will fail in a more spectacular way -- if this happens, try unplugging & replugging the USB and restarting the sketch. For even more extreme failures -- I had some random probelsm with the pins no longer responding. if you change the input pins (in reality and in code), replug the Arduino and restart the sketch you should be fine.

The circuit is pretty simple -- the 3V3 pin is connected via some large (I think in my case I settled on 100k Ohms, but anything within an order of magnitude or so will work) resistors to both the input pins and to some longer wires terminating in the bowls of custard. The correct holes to put the input wires in is currect 3 and 6 -- you can also find this in the values placed at the top of the sketch.

And if there's anything else, please call or email. I'm at 07962403825, and at vtwentyone@gmail.com