Arduino Firmata and Processing

I am trying to set up in analog read in Processing with the pull-up resistor. I keep getting an error. Any ideea what is wrong?

Here is my code

import processing.serial.*;

import cc.arduino.*;

Arduino arduino;

void setup() {

arduino = new Arduino(this, Arduino.list()[0], 57600); arduino.digitalWrite(119, Arduino.HIGH); }

void draw() { while (true){

println (arduino.analogRead(5)); delay(500); } }

Here is my error

java.lang.ArrayIndexOutOfBoundsException: 119 at cc.arduino.Arduino.digitalWrite( at Temporary_8327_2581.setup( at processing.core.PApplet.handleDisplay( at processing.core.PGraphics.requestDisplay( at at Source)

You are trying to digitalwrite to pin 119 in the setup- thats why you get an array out of bounds error - they only go up to 13!


Taken from

The analog pins also have pullup resistors, which work identically to pullup resistors on the digital pins. They are enabled by issuing a command such as digitalWrite(14, HIGH); // set pullup on analog pin 0

while the pin is an input.

If I try to enable it directly from arduino there is no problem.

The Processing library for Firmata doesn't support using the analog inputs as normal digital pins.