using arduino library on processing and enabling internal pull-up resistor

I am trying to made this project(http://www.instructables.com/id/Pressure-Sensor-Matrix/ ) and using arduino library on processing (firmata) for serial communication. For this project, it requires a pull-up resistor which arduino analog pins also have and need to be enabled with code, while I tried a lot of times it's still not working. I am wondering is the arduino library on processing capable for enable pull-up resistor? Has anyone done that before?

my sensor is connected to 5v on one end, and on the other is gnd and A0

I upload standardFirmata to Arduino. Here is my processing code:

import cc.arduino.*;
import org.firmata.*;
import processing.serial.*;

Arduino arduino;
int A1;
int A2;

void setup() {  
size(800, 500);
arduino = new Arduino(this, Arduino.list()[1], 57600);


arduino.pinMode(A1, Arduino.INPUT_PULLUP);

arduino.pinMode(A2, Arduino.INPUT_PULLUP);
}

void draw() {

background(255);
stroke(0);

 if (arduino.analogRead(A1)!=0) {

  rect(150, 100, 100, 300);
  fill(#BFA4E5);
  }


  if (arduino.analogRead(A2)!=0) {

  rect(250, 100, 100, 300);
  fill(#BFA4E5);
   }

   }

Also posted at Using Arduino library in Processing and enabling internal pull-up resistor - Stack Overflow

Anrn:
up vote
0
down vote
favorite

Talk about a sloppy copy-paste job.

int A1;
int A2;

void setup() { 
size(800, 500);
arduino = new Arduino(this, Arduino.list()[1], 57600);


arduino.pinMode(A1, Arduino.INPUT_PULLUP);

arduino.pinMode(A2, Arduino.INPUT_PULLUP);

Which pins, specifically do you think you defined as INPUT with the pullup resistor enabled?

You actually just tried to set digital pin 0 to INPUT mode, with the pullup resistor enabled. How do you suppose that desire got to the Arduino?