Interfacing SCP1000 whit Max/MSP - Firmata problem

Hi everybody...

For Graduate I want interface SCP1000 and Max/MSP, I' ve chose the Maxuino 007 maxpatch in max.

Maxuino requires on arduino the Standard Firmata 2.1, i can't modify it whit the code i have found in this forum for the SCP1000.
How can I include this code in the firmata to receive in Max/MSP the SCP1000 temperature and pressure??

I have now except from firmata the digital pin from 2 to 5, to connect the sensor, and included the variables for it but i can't redirect the spc1000 data to the usb serial whit all firmata data, i can't include the code in the firmata.

Please Help me!!
SCP1000 Original Code

// define spi bus pins
#define SLAVESELECT 10
#define SPICLOCK 13
#define DATAOUT 11      //MOSI
#define DATAIN 12       //MISO
#define UBLB(a,b)  ( ( (a) << 8) | (b) )
#define UBLB19(a,b) ( ( (a) << 16 ) | (b) )

//Addresses
#define REVID 0x00      //ASIC Revision Number
#define OPSTATUS 0x04   //Operation Status
#define STATUS 0x07     //ASIC Status
#define START 0x0A      //Constant Readings
#define PRESSURE 0x1F   //Pressure 3 MSB
#define PRESSURE_LSB 0x20 //Pressure 16 LSB
#define TEMP 0x21       //16 bit temp

char rev_in_byte;          
int temp_in;
unsigned long pressure_lsb;
unsigned long pressure_msb;
unsigned long temp_pressure;
unsigned long pressure;

void setup()
{
  byte clr;
  pinMode(DATAOUT, OUTPUT);
  pinMode(DATAIN, INPUT);
  pinMode(SPICLOCK,OUTPUT);
  pinMode(SLAVESELECT,OUTPUT);
  digitalWrite(SLAVESELECT,HIGH); //disable device  
  
  SPCR = B01010011; //MPIE=0, SPE=1 (on), DORD=0 (MSB first), MSTR=1 (master), CPOL=0 (clock idle when low), CPHA=0 (samples MOSI on rising edge), SPR1=0 & SPR0=0 (500kHz)
  clr=SPSR;
  clr=SPDR;
  delay(10);
  Serial.begin(9600);
  delay(500);

  Serial.println("Initialize High Speed Constant Reading Mode");
  write_register(0x03,0x09);
}

void loop()
{
  
  rev_in_byte = read_register(REVID);
  
  pressure_msb = read_register(PRESSURE);
  pressure_msb &= B00000111;
  pressure_lsb = read_register16(PRESSURE_LSB);
  pressure = UBLB19(pressure_msb, pressure_lsb);
  pressure /= 4;
  
  Serial.print("PRESSURE [");
  Serial.print(pressure, DEC);
  Serial.println("]");
  
  temp_in = read_register16(TEMP);
  temp_in = temp_in / 20;
  temp_in = ((1.8) *temp_in) + 32;
  Serial.print("TEMP  [");
  Serial.print(temp_in , DEC);
  Serial.println("]");

  delay(1500);
  
}

char spi_transfer(volatile char data)
{
  SPDR = data;                    // Start the transmission
  while (!(SPSR & (1<<SPIF)))     // Wait for the end of the transmission
  {
  };
  return SPDR;                    // return the received byte
}


char read_register(char register_name)
{
    char in_byte;
    register_name <<= 2;
    register_name &= B11111100; //Read command
  
    digitalWrite(SLAVESELECT,LOW); //Select SPI Device
    spi_transfer(register_name); //Write byte to device
    in_byte = spi_transfer(0x00); //Send nothing, but we should get back the register value
    digitalWrite(SLAVESELECT,HIGH);
    delay(10);
    return(in_byte);
  
}

float read_register16(char register_name)
{
    byte in_byte1;
    byte in_byte2;
    float in_word;
    
    register_name <<= 2;
    register_name &= B11111100; //Read command

    digitalWrite(SLAVESELECT,LOW); //Select SPI Device
    spi_transfer(register_name); //Write byte to device
    in_byte1 = spi_transfer(0x00);    
    in_byte2 = spi_transfer(0x00);
    digitalWrite(SLAVESELECT,HIGH);
    in_word = UBLB(in_byte1,in_byte2);
    return(in_word);
}

void write_register(char register_name, char register_value)
{
    register_name <<= 2;
    register_name |= B00000010; //Write command

    digitalWrite(SLAVESELECT,LOW); //Select SPI device
    spi_transfer(register_name); //Send register location
    spi_transfer(register_value); //Send value to record into register
    digitalWrite(SLAVESELECT,HIGH);
}

Hi...
I' ve found a scp1000 library and try to use it.
I' ve modified the pin setting to use the 2/3/4/5 pins, I previously disabled for firmata.
How i can read the Scp1000 result to send from firmata???

SCP1000 library: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236443720/8 (reply #14)

Code I've Add to Firmata

#include <scp1000.h>
#define SelectPin 2
SCP1000 scp1000(SelectPin);

Code I've Modified in Scp1000 library

const byte DataOutPin = 3;
const byte DataInPin = 4;
const byte SPIClockPin = 5;

The SCP1000 code uses the Arduino's SPI communication. That is a hardware module built into the chip which only works on pins 11, 12, and 13 (on Duemilanove), hence why those were constants defined in the class instead of being variable parameters.

If you really and truly must communicate with the SCP using different pins, then you would have to re-write the class methods "spi_transfer" and "init" to bit-bang spi on different pins.