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(Arduino.java:194) at Temporary_8327_2581.setup(Temporary_8327_2581.java:10) at processing.core.PApplet.handleDisplay(PApplet.java:1390) at processing.core.PGraphics.requestDisplay(PGraphics.java:690) at processing.core.PApplet.run(PApplet.java:1562) at java.lang.Thread.run(Unknown 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!

HTH

Taken from http://www.arduino.cc/en/Tutorial/AnalogInputPins

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.