Hello,
I'm new to programming and I'm trying pull serial data from my Arduino into Processing. The data is coming from an accelerometer. I have installed "Standard Firmata" on the Arduino but when I try to run my processing program, I'm getting the above mentioned error message. Any help would be much appreciated. Here's my code:
import processing.serial.*; Serial port;
int serialCount = 3; int sensorPinX = 2; int sensorPinY = 3; int sensorPinZ = 4; int[] xArray = new int [8]; //smoothing can adjust numbers from 0 - 10 or highger int[] yArray = new int [8]; int[] zArray = new int [8]; char DELIM = ','; int length;
void setup() {
String arduinoPort = Serial.list()[0]; port = new Serial(this, arduinoPort, 9600); }
void draw() { int i; int xpos; int ypos; int zpos;
int getAverage(int valueArray []){ int i; int sum = 0; int average; for (i=0;i<length;i++) { sum += valueArray[i]; } average = sum/length; return average; }