Hi this is my first arduino/ processing project, the car's speed is determined by an LDR, but somehow the effect is this instead of a normal car moving. again this is my first project, I probably made a real stupid mistake but help would be appreciated. using a arduino uno with latest stable version of processing.
here is my code:
import processing.serial.*;
import cc.arduino.*;
import ddf.minim.*;
AudioSample kick;
Minim minim;
PImage img;
int posX = 21;
int posY = 425;
boolean a = false;
Arduino arduino;
int myValue;
int buttonPin = 2;
int ledr1 = 13;
int ledr2 = 12;
int ledr3 = 4;
int ledg = 7;
int buttonState = 0;
int speaker = 8;
void setup()
{
background(0);
size(1600,850);
minim = new Minim(this);
kick = minim.loadSample("countdown.mp3");
//player.play();
img = loadImage("car.png");
println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[0], 57600);