Redpark cable to Arduino Pro mini

Hi I'm currently working on a project trying to communicate an iphone with an arduino pro mini. The code works using the arduino UNO but not with PRO mini. What can it be the mistake? I think that I am doing something wrong with the connections.

Any suggestions?

ppolyviou89: The code works using the arduino UNO but not with PRO mini.

Which pro mini are you using? 5v or 3.3v?

Also, can you be more specific about what's not working? Does it do nothing?

ppolyviou89: I think that I am doing something wrong with the connections.

What are the connections? Also, are you using a logic level converter?

Just sending signal to turn an output pin on and off. Currently I am using serial.begin(), and I read some other posts saying that you must use Serial1.begin(). Is that the prob?

The arduino is the 5V one

Anyone who has connected the redpark cable with an arduino pro mini again? I have some troubles and I am not sure if I am doing something wrong with the wiring or it is the code.

Here is my code. Note that it works fine using the arduino UNO

#define LENGTH 2
int rxBuffer[128];
int rxIndex = 0;


void setup() {
  
Serial.begin(1200);

pinMode(12, OUTPUT);
pinMode(13, OUTPUT);

digitalWrite( 12, HIGH);
delay(1000);
digitalWrite( 12, LOW );
digitalWrite( 13, HIGH);
delay(1000);
digitalWrite( 13, LOW );
}

void loop (){
  
if (Serial.available() > 0) {
    rxBuffer[rxIndex++] = Serial.read();
  
    if (rxIndex == LENGTH) {
      
Serial.print( "Set: " );
Serial.print( rxBuffer[0], DEC );
Serial.print( " to: " );
Serial.println( rxBuffer[1], DEC );      
      
        if( rxBuffer[1] == 0 ) {
digitalWrite((int)rxBuffer[0], LOW);
} 

else {
digitalWrite((int)rxBuffer[0], HIGH);
}    

rxIndex = 0;
}

}
delay(10);
}

Thanks

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

If yes does anyone knows how to use it and what is the difference between using the Arduino uno with the cable Any suggestions are welcome it is very important!! (deadline is close)

Thank u

Please stop cross-posting - it wastes time.