sentry coding

hi all. greetings from south africa. I need help please. i have downloaded the code from rudolphlabs for the sentry paintball turret but i cannot seem to get the code to work with my processing. one error is the size of your sketch could not be determined by your code. the other one says that certain libraries are missing like Jmon but they are indeed there.

can i mail the code to somebody so they can have a look. iam totally new to arduino and i need this code to load as we are building a sentry for a project.

thanks in advance

See Read this before posting a programming question and post your code and error messages here following the advice in that thread

here is error number 1 so far


Until you post your COMPLETE code (as text in code tags NOT pictures) no-one will be able to help.


This seems to be some internal error of the IDE process, not your code per se.
Post all of your project as a zip.
We can’t debug an error at a time when only provided with the error.

Or at least link to the example code you downloaded and list the libraries you used. Are you sure they are the same ones as the original project?
We don’t need to be going off searching the web for “rudolphlabs sentry paintball turret” and just hope we randomly hit upon the same version you are using.

i tried posting the link self but too big. hope this helps please

-------------------- Project Sentry Gun --------------------

----- An Open-Source Project, initiated by Bob Rudolph -----

Help & Reference: Loading...
Forum: Loading...

A few keyboard shortcuts:
press ‘p’ for a random sound effect
press ‘b’ to set background image
hold ‘r’ and click+drag to form a rectangle “fire-restricted” zone
press SPACEBAR to toggle manual/autonomous modes
press SHIFT to toggle arrow-key aiming in manual mode


// <===============================================================================================>
// Begin custom values - change these camera dimensions to work with your turret
// <===============================================================================================>

public int camWidth = 320; // camera width (pixels), usually 160n
public int camHeight = 240; // camera height (pixels), usually 120

// <===============================================================================================>
// End custom values
// <===============================================================================================>

boolean PRINT_FRAMERATE = false; // set to true to print the framerate at the bottom of the IDE window

int diffPixelsColor = {
255, 255, 0
}; // Red, green, blue values (0-255) to show pixel as marked as target
public int effect = 0; // Effect

public boolean mirrorCam = false; // set true to mirror camera image

public float xMin = 0.0; // Actual calibration values are loaded from "settings.txt".
public float xMax = 180.0; // If "settings.txt" is borken / unavailable, these defaults are used instead -
public float yMin = 0.0; // otherwise, changing these lines will have no effect on your gun's calibration.
public float yMax = 180.0; //

import JMyron.;
import blobDetection.
import processing.serial.;
import ddf.minim.
import java.awt.Frame;
import processing.opengl.; // see note on OpenGL in void setup()
import procontroll.

public int minBlobArea = 30; // minimum target size (pixels)
public int tolerance = 100; // sensitivity to motion

public boolean runWithoutArduino = false;
public boolean connecting = false;

public Serial arduinoPort;
JMyron camInput;
BlobDetection target;
Blob blob;
Blob biggestBlob;

int Background;
int rawImage;
int rawBackground;
int currFrame;
int screenPixels;
public int targetX = camWidth/2;
public int targetY = camHeight/2;
int fire = 0;
int prevFire = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0

float xRatio;
float yRatio;

int possibleX = camWidth/2;
int possibleY = camHeight/2;

int displayX = camWidth/2;
int displayY = camHeight/2;

int oldX = camWidth/2; // smoothing (contributed by Adam S.)
int oldY = camHeight/2; // smoothing
int xdiff; // smoothing
int ydiff; // smoothing
public float smoothingFactor = 0.8; // smoothing
public boolean activeSmoothing = true;

String strTargetx;
String strTargety;
String fireSelector;
String scanSelector;

public boolean showDifferentPixels = false;
public boolean showTargetBox = true;
public boolean showCameraView = true;
public boolean firingMode = true; // true = semi, false = auto
public boolean safety = true;
public boolean controlMode = false; // true = autonomous, false = manual
public boolean soundEffects = false; // set to true to enable sound effects by default
public boolean scanWhenIdle = true;
public boolean trackingMotion = true;

int idleTime = 10000; // how many milliseconds to wait until scanning (when in scan mode)
int idleBeginTime = 0;
boolean scan = false;

public String serPortUsed;

int fireRestrictedZones = new int[30][4];
int restrictedZone = 1;

This is Java.

boolean showRestrictedZones = false;

boolean selectingColor = false;
boolean trackingColor = false;
int trackColorTolerance = 100;
int trackColorRed = 255;
int trackColorGreen = 255;
int trackColorBlue = 255;

boolean selectingSafeColor = false;
boolean safeColor = false;
int safeColorMinSize = 500;
int safeColorTolerance = 100;
int safeColorRed = 0;
int safeColorGreen = 255;
int safeColorBlue = 0;

boolean useArrowKeys = false; // use arrow keys to finely adjust the aiming (in manual mode)

public boolean useInputDevice = false; // use a joystick or game controller as input (in manual mode)
public boolean inputDeviceIsSetup = false;

public ControllIO controlIO; // more stuff for using a joystick or game controller for input
public ControllDevice inputDevice;

public ControllButton buttons = new ControllButton[30];
public ControllSlider sliders = new ControllSlider[10];

public ControllButton fire_buttons = new ControllButton[0];
public ControllButton preciseAim_buttons = new ControllButton[0];
public ControllButton centerGun_buttons = new ControllButton[0];
public ControllButton autoOn_buttons = new ControllButton[0];
public ControllButton autoOff_buttons = new ControllButton[0];
public ControllButton inputToggle_buttons = new ControllButton[0];
public ControllButton randomSound_buttons = new ControllButton[0];

public ControllSlider pan_sliders = new ControllSlider[0];
public ControllSlider tilt_sliders = new ControllSlider[0];
public ControllSlider panInvert_sliders = new ControllSlider[0];
public ControllSlider tiltInvert_sliders = new ControllSlider[0];

public float xPosition = camWidth/2;
public float yPosition = camHeight/2;

String inStringSplit; // buffer for backup
int controlMode_i, safety_i, firingMode_i, scanWhenIdle_i, trackingMotion_i, trackingColor_i, leadTarget_i, safeColor_i,
showRestrictedZones_i, showDifferentPixels_i, showTargetBox_i, showCameraView_i, mirrorCam_i, soundEffects_i;

void setup() {


size(camWidth, camHeight); // some users have reported a faster framerate when the code utilizes OpenGL. To try this, comment out this line and uncomment the line below.
// size(camWidth, camHeight, OPENGL);
minim = new Minim(this);
camInput = new JMyron();
camInput.start(camWidth, camHeight);
currFrame = camInput.image();
rawImage = camInput.image();
Background = camInput.image();
rawBackground = camInput.image();
screenPixels = camInput.image();
target = new BlobDetection(camWidth, camHeight);


xRatio = (camWidth / (xMax - xMin)); // used to allign sights with crosshairs on PC
yRatio = (camHeight/ (yMax - yMin)); //

Still Java
You can stop posting (badly) now.

guys. iam not sure what you want. iam posting this now in the only form i know and this too is not correct. can somebody please help me. i just need somebody to please look at link i posted to the file to see if it works.
iam really at my whitss end

You’re posting Java on a forum that deals with a platform that is incapable of running Java.

Do you see the problem?

Please remember to use code tags when posting code.

The code for the Arduino is in folder...\Project-Sentry-Gun-master\Arduino\PSG_Arduino_Code
This compiles correctly without adding any additional libraries (at least on my system).

The other stuff under...\Project-Sentry-Gun-master\Processing Java, as already pointed out. And so it's supposed to run somewhere else other than on an Arduino.

Where that is, or how this project is supposed to work, I can't say as the rudo*** site seems to have gone AWOL and is now serving up all kinds of unrelated and potentially dangerous content.

TBH I'm not sure I'd trust the contents of the github based on that. Maybe it's what the author originally published, maybe not...

Where did you get the link to the github from? Where is the description of the project and how to build it?

Which version of Processing (note the use of capital ‘P’) do you have?