3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.


Autonomous Paintball Sentry Gun

Step 6Software

Software
Now you have your sentry gun built, the wiring finished, and no doubt you want it to do something!

Before you plug your Arduino into your computer, go download the Arduino IDE .

If you have a Diecimila or older board, set the Power Jumber to USB.
Now, plug your Arduino in -  the green Power LED on the Arduino should light up, and the orange LED might flash a few times. Good job!


The Arduino IDE is what you will use to load the Arduino program onto your board. However, you will need the seperate, Processing IDE to run the computer side of the code. This does the camera tracking, and sends commands to the Arduino.
Go download the Processing IDE .


Open both Processing IDE and Arduino IDE. They should look very similar.


With a little bit of trial-and-error on the code, you should have a working sentry in no time! So get started typing!






Just kidding, of course.

The next thing you need to do is download the JMyron, blobDetection, and controlP5 libraries  from processing.org. Find the link to each library on that page. The instructions for downloading each one can be found by clicking on it's link.


You are ready to go get the code!  Download the latest version it from my website . After you have saved it to your computer, unzip the folder, and follow the directions in the strategically placed README.txt files.


Open the Arduino code in the Arduino IDE. Make sure you have selected the proper board and serial port from the Tools menu. Next, click 'Verify', wait for it to say "done compiling", then click 'Upload'. The RX and TX LED's on the Arduino board should pulse a little, then stop.


Congrats! You have finished programming the Arduino!

Plug in your webcam. Install the drivers, if you haven't already.

Now, open the Processing code in the Processing IDE. Click 'Run', and watch the magic happen!


Of course, for many of you this will not work on the first try. Don't get upset, it's normal. Pop me an email with any problems, or leave a comment below.


A tip for Windows 7 users, from ljfa321:

If you are getting this error when you try to run: processing.app.debug.RunnerException: UnsatisfiedLinkError: D:\Software\processing-1.2.1\libraries\JMyron\library\JMyron.dll: Can't find dependent libraries:

"Reason : Windows 7 doesn't come with MicroSoft C libraries, which were normally include in the other (older) Windoes system.
This means there are two files missing in the Windows 7 system: MSVCP71.DLL and Msvcr71.dll
Solution : Download these two files from here:
http://www.addictivetips.com/?attachment_id=38105
AND!
For Windows 7 32-bit OS: put both dll files inside Windows/System32 folder
For Windows 7 64-bit OS: put both dll files inside Windows/SysWOW64 folder."
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Apr 27, 2012. 6:39 PMledfreak01 says:
im geting an error running procesing
"unsatisfiedlinkerror: C:\users\owener\documents\processing\libraries\jmyron\library\jmyron.dll: cant find dependent libraries "
why is this?

Feb 7, 2011. 11:46 AMstarkec says:
when trying to run i keep getting this error,

processing.app.debug.RunnerException: UnsatisfiedLinkError: D:\Software\processing-1.2.1\libraries\JMyron\library\JMyron.dll: Can't find dependent libraries
at processing.app.Sketch.placeException(Sketch.java:1543)
at processing.app.debug.Runner.findException(Runner.java:582)
at processing.app.debug.Runner.reportException(Runner.java:558)
at processing.app.debug.Runner.exception(Runner.java:498)
at processing.app.debug.EventThread.exceptionEvent(EventThread.java:367)
at processing.app.debug.EventThread.handleEvent(EventThread.java:255)
at processing.app.debug.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: D:\Software\processing-1.2.1\libraries\JMyron\library\JMyron.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at JMyron.JMyron.(JMyron.java:14)
at Turret_05_03.setup(Turret_05_03.java:142)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)

I have installed jmyron as instructed in the file but i still get this error :(
Your help would be greatly appreciated :)
Mar 13, 2011. 8:46 PMtorivc says:
Can't wait to do your build.
However, I did the same thing and no results
can you explain a little more on your instructions:

"IMPORTANT FOR WINDOWS USERS: there is a folder called "Extra DLLs" - those are DLLs that JMyron depends on so make sure they're copied into your system's DLL search path - such as the Processing root directory, or even C:\windows\System32."

Place "Extra DLLs" to system's DLL search path" I don't understand this.

a video tutorial would be great for your instrucable
Mar 22, 2011. 9:43 PMtorivc says:
So i've done that and various ways to get this program off the ground. Unfortunately, no avail can you make a screen cast of exactly how to successfully acomplish this project. There nothing but endless failures on my attempts on this project. I'm really looking forward to this.
Feb 9, 2011. 7:50 PMljfa321 says:
I just run into that problem yesterday, seems like they doulbe do the packaging work
Feb 10, 2011. 8:49 PMljfa321 says:
ok, that make sence XD

BTW, do you know what kind of souce I will be able to find a air solenoid?

I want to use it to control the release of compressed air.

Ask every shops I can think of in my town and still no luck.

Feb 12, 2011. 3:35 PMljfa321 says:
thx alot
Feb 13, 2011. 11:29 PMljfa321 says:
Something funny happen, I have no problem with this setting in my Windows VISTA machine, but fail to work when I try to install it to my Windows 7 machine.

The error message is exactly the same
(processing.app.debug.RunnerException: UnsatisfiedLinkError: D:\Software\processing-1.2.1\libraries\JMyron\library\JMyron.dll: Can't find dependent libraries)

I event try to copy the entire working folder from VISTA to 7, but still no luck, and I do put the DLLs in to both process root and C:\Windows\System32.

Any idea how this happened?

BTW, my windows 7 machine is completly clean, I only install the new version of JAVA since the one come with the installing CD is old I think.
Feb 13, 2011. 11:44 PMljfa321 says:
Also, my Windows7 machine don't have a webcam installed, perhaps thats the reason of the error message?
Feb 15, 2011. 10:03 PMljfa321 says:
I actually bought a webcam to connect to the windows7 machine this morning. The webcam work like a charm, but the process still show the same error massage.

Also, I try to put the two dll files all over the place, but still got no luck so far.

I will keep trying tonight~
Feb 15, 2011. 10:49 PMljfa321 says:
OK, problem solved, you might want to add this to your tutorial, since all windows 7 machine should inconter this problem.


Reason: Windows 7 doesn't come with MicroSoft C libraries, which were normally include in the other (older) Windoes system.
This means there are two files missing in the Windows 7 system: MSVCP71.DLL and Msvcr71.dll

Solution: Download these two files from here:
http://www.addictivetips.com/?attachment_id=38105

AND!

For Windows 7 32-bit OS: put both dll files inside Windows/System32 folder

For Windows 7 64-bit OS: put both dll files inside Windows/SysWOW64 folder

Than the program should run with no problem.

==========================================

New problem occurs now, but not a very big deal to me though.

Still, in Windows 7 machine, the behavior of the portal sound track is weired.

When start the program, the first sound track (deploying~) plays no problem, but whatever the sound track comes after that, tent to lag forever at the end of it.

Example: press RUN > First sound: "Deplaying" > Second sound: "Will you come over herererererererererererererererererererer................"


The tracking still works fine and smooth while the sound is lagging, it just really creeped me out when I first heard this at 1:30am by myself XD"
Feb 13, 2011. 12:16 PMDannne11 says:
im getting the error

processing.app.debug.RunnerException: unexpected char: 'i'
at processing.app.Sketch.preprocess(Sketch.java:1352)
at processing.app.Sketch.preprocess(Sketch.java:1205)
at processing.app.Sketch.build(Sketch.java:1568)
at processing.app.Sketch.build(Sketch.java:1553)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1485)
at java.lang.Thread.run(Thread.java:619)

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
15
Followers
2
Author:sentryGun53