Pages: [1]   Go Down
Author Topic: Redpark cable to Arduino Pro mini  (Read 233 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Southern California
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

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

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

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
#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: [code] [/code] tags added.
« Last Edit: June 01, 2013, 03:05:09 pm by Coding Badly » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24450
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please stop cross-posting - it wastes time.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: