4195158637_ca8b0287df.jpg
I've seen a few virtual graffiti systems on the web but couldn't find any information published on how to make one (though see final links page). I thought it would be great for my graffiti workshops, so I made one myself and have published everything you need to make your own here!



Features

* all open source and hardware,
* cost < £100 excluding projector and computer,
* detects can's nozzle pressure and distance from the screen,
* models paint dripping if you move too slowly!

Notes

* this instructable is quite high level, but please let me know if I've missed something important,
* the computing setup is for Linux. If you get it working on other systems, please post your instructions!

Skills you'll need

* wood working to make the wooden rear projection screen,
* electronic circuits and programming Atmel AVR micro controllers (or arduino),
* be able to install some libraries on your computer to allow processing to talk to the wiimote.


 
Remove these adsRemove these ads by Signing Up

Step 1: How it works

4195158395_2ee12b663f.jpg
* The spray can has an infra red LED that shines through the projector screen and is seen by the wiimote's camera.
* The wiimote sends the X and Y co-ordinates of the can to the computer via a bluetooth radio link.
* The computer is running a simple painting program that uses a projector to "paint" the lines as you draw with the can. It also takes care of mapping the wiimote camera to the screen using a 4 point calibration system.
* The spray can also detect its distance from the screen and the nozzle pressure: the further you are away the bigger the dot drawn, the harder you press the nozzle, the more opaque the paint dot becomes.

mtwister says: Jun 15, 2012. 11:14 PM
Hi Matthew,

Thanks for the detailed instructions. I did everything explained above to connect Processing and the Wiimote, but I get the following error:

The type lll.Loc.Loc cannot be resolved. It is indirectly referenced from required .class files

Do you know how to fix this error?

Thanks a lot for your help.

mtwister
SeeDoubleYouNL says: Jan 18, 2012. 1:46 PM
Hey Matthew, thanks for you work. I tried your steps but when I run wiimote_sensor.pde processing gives me the following error:

Native Library bluecove not available
!! There may be no USB dongle/device. !!
java.lang.IllegalStateException: Bluetooth failed to initialize. There is probably a problem with your local Bluetooth stack or API.
at wiiremotej.WiiRemoteJ.(WiiRemoteJ.java:74)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:301)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:290)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:284)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:278)
at wiimotetest.setup(wiimotetest.java:30)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.bluetooth.BluetoothStateException: BlueCove library bluecove not available
at com.intel.bluetooth.BlueCoveImpl.loadNativeLibraries(BlueCoveImpl.java:381)
at com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:429)
at com.intel.bluetooth.BlueCoveImpl.access$500(BlueCoveImpl.java:65)
at com.intel.bluetooth.BlueCoveImpl$1.run(BlueCoveImpl.java:1020)
at java.security.AccessController.doPrivileged(Native Method)
at com.intel.bluetooth.BlueCoveImpl.detectStackPrivileged(BlueCoveImpl.java:1018)
at com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:1011)
at javax.bluetooth.LocalDevice.getLocalDeviceInstance(LocalDevice.java:75)
at javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:95)
at wiiremotej.WiiRemoteJ.(WiiRemoteJ.java:67)
... 8 more

When I run $ hcitool scan it dows see the wiimote so the dongle is probably not the problem. Any suggestions?
matthewvenn (author) in reply to SeeDoubleYouNLJan 18, 2012. 2:55 PM
I'm sorry it's been such a long time since I did any work on this project, quite a lot has probably changed.

I'd google the phrase:


Caused by: javax.bluetooth.BluetoothStateException: BlueCove library bluecove not available

And try some of the suggestions.

Sorry I can't help more,
Matt
ulfilas says: Apr 14, 2010. 7:11 AM
 Having trouble with this :( should this be run in processing? If so - do I need to rename this as another file name? I did try - but I get errors. Was it an earlier version of processing than the one currently available.. do I use the withoiut java one?
sanspaper in reply to ulfilasFeb 14, 2011. 7:59 PM
rename it to a .pde file.
matthewvenn (author) in reply to ulfilasApr 14, 2010. 8:24 AM
Did you manage to get everything running in step 6? If so then this should be straight forward.

I'm using processing 1.0.9.

What errors are you getting?

ulfilas in reply to matthewvennApr 14, 2010. 2:50 PM
 okay so I managed to work out ow to extract the file by changing its name from a tmp file to a tar.gz and extracting it using 7-zip !  I now have the file open in processing - I'm getting a thing saying that "package III does not exist. You might be missing a library"
matthewvenn (author) in reply to ulfilasApr 15, 2010. 1:45 AM
 good work, sorry I should have provided a .zip.

You need to install all the libraries detailed in the previous step. Have you followed those steps exactly? Can you see the lll directories that need to be created?

Let me know if that helps,

Matthew
sc_r says: Jan 12, 2010. 9:14 AM
Hey! This is cool, just got all of the bits together but struggling to download the .pde file - it just links to a .tmp file.

What gives? Could you upload it again please? or mail the code over to stuchilds [at] gmail.com

Nice one, good work Matthew :)
matthewvenn (author) in reply to sc_rJan 13, 2010. 7:13 AM
download it and rename it to spraycan.pde
I don't know why it changes the name. I tried uploading it again but same result.
sc_r in reply to matthewvennJan 13, 2010. 9:00 AM
Thanks for this - I downloaded the .tmp file, renamed to spraycan.pde and looks like arduino code. Will have a play later.

For others: this pinout of the atmega/arduino will help:

http://arduino.cc/en/Hacking/PinMapping168

Next thing I'm struggling with is the external crystal osc:

I don't have the facilities to reset the fuse / timing on the atmega chip so thought would try to use an external 16MHz crystal.
[this one: http://uk.farnell.com/jsp/search/productdetail.jsp?CMP=i-ddd7-00001003&sku=9712526 ]

Now, as I am trying to build this circuit around an actual Arduino board I can't see a way of connecting the external osc. as pins 9/10 of the atmega chip do not have an external connection, they are linked to the onboard crystal.

Will keep updating progress.. Trying to use a pressure sensitive resistor instead of a linear pot. for the cap assembly instead in the hope that it will be a little more durable [plus I have some lying around to play with]

Lovely.
stuart
matthewvenn (author) in reply to sc_rJan 13, 2010. 9:53 AM
Stuart, I've updated step 4 with info about crystals etc. See the new section Building a circuit from scratch vs using an arduino board

Basically, you only need to use external crystal if you're making a board from scratch and you don't have a fuse programmer.
DIIILIIII says: Jan 9, 2010. 7:23 AM
Hey man this is awesome, we made a simpler version in 2008, link here http://friispray.co.uk/infra-red-spray-can/ and we've been looking to implement the arduino and the pressure and distance sensors for the past year, would it be cool to blog about this on our site? we've ordered all the bits and are going to try out a new version based on your findings next week, were massive believers in open source so everything will be credited as you. 

Weve taken the one we made all round the UK and originally made it for back projecting on windows. were also taking it to NY in march time and would be great to see you there.

Super Nice

Dave
JamJarcollective.com
matthewvenn (author) in reply to DIIILIIIIJan 9, 2010. 10:24 AM
Hey Dave,

I actually found your site after making my own, and don't know why I didn't find it earlier! I found wiispray and some videos on the internet but nothing opensource. I've been meaning to get in contact with you guys anyway!

So yes, please take anything and feel free to ask any questions/post blogs etc.

I'm in London, not NY, where are you based?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!