Make Your Own‎ > ‎

Setup the PSG Code

Setup Steps:

1)  Click here to download the most recent version of the code. (Or download it from the PSG GitHub repository by clicking the "ZIP" button.) Unzip the download package.

2) Copy the 'Arduino' and 'Processing' folders to your 'My Documents' folder (or to whichever folder 'arduino-1.0.3' and 'processing-1.5.1' are located in). If you already have folders  called 'Arduino' or 'Processing', then merge these with them:

3) Copy "myron_ezcam.dll" and "DSVL.dll" to the 'processing-1.5.1' folder.

4) Open "PSG_Arduino_Code.ino" in the Arduino IDE.

5) Set the proper type in the "#define type" line at the top of the Arduino Code ("Arduino_bare" if your microcontroller is the Arduino Uno, "Standalone_v8" if your microcontroller is a Sentry Controller.

6) Select your board from the Tools > Board menu ("Arduino Uno" if you have an Arduino Uno, or "Arduino Duemilanove w/ ATmega328" if you have a Sentry Controller), and then click 'Upload'.  You only need to do this once ever, so close the Arduino IDE.

7) Make sure that your webcam drivers are installed and working. 

8) Plug in your webcam and microcontroller.

9) Finally, open "PSG_Processing_Code.pde" in the Processing IDE. Click run, and the Project
Sentry Gun code should start up for you. Enjoy!

Minimal Version (optional)

A 'Minimal' Version of the Processing code is provided as a part of the code download package. This is intended for more advanced users, who may want to run the Processing code on a low-power platform with. It uses just over half the amount of memory as the standard version. If you use this 'Minimal' version, be sure to read the instructions in the comments at the top of the code to properly import your saved settings.

Additional Info and Troubleshooting:

A tip for Windows 7 users, from lgfa321:

If you are getting this error when you try to run: 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:
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."

Setup Instructions for OSX 10.7 Lion (from AaronW):
  1. Unzip and Install the Arduino IDE v1.0 for OSX into your applications folder.
  2. Unzip and Install the Processing IDE v1.5.1 for OSX into your applications folder.
  3. Run the Arduino IDE,( I was prompted to automatically download and install a Java runtime as this was run on a clean install of OSX).
  4. Run the Processing IDE, and close it again.
  5. Check that there is now an “arduino” and “processing” folder in your user “Documents” folder
  6. Download Code Version from the Project Sentry Gun Website.
  7. Extract the zip file and open “Code Version Code/Turrett_06_02/Turret_06_02.ino”,in the Arduino IDE, upload to your Arduino controller.
  8. Copy the “Code Version code/libraries” folder to your user “Documents /Processing” folder.
  9. Download libJMyron.jnilib compiled for intel macs from and use it to replace the libJMyron.jnilib currently located in your user “Documents/Processing/libraries/JMyron/library” folder.
  10. Run the Processing IDE and load “Code Version code/Turrret_06_02/Turret_06_02.pde”.
  11. Click Run.

Here's an old video tutorial. Note that some parts of this are outdated, but it may still be helpful. In either case, I'll keep it here for reference.

Next step: Using the Software