Polulo micro serial servo controller <=> UNO : StartUp problems: SoftwareSerial (?!)

 

Hi All,

In my project I combine an Arduino UNO with the Polulo micro serial servo controller http://www.pololu.com/catalog/product/207. I use the servo controller because I have more servo’s in my project than free available digital pins. I run into problems however at start up. Arduino comes up ok, but the servo controller jumps into error mode: amber led permanent on and red led flashing.

I found a few posts on the Internet. This one describes the same difficulties as I have http://forum.pololu.com/viewtopic.php?t=745 (search for led). I experimented with delays, but no success. 

The servo controller is linked to the UNO via software serial. I think the problem lies here. Relevant part of my code.


    #define Tx                  2              // define digital pins to use as RX and TX for software serial connections
                                                       // Servo controller, Arduino pin connected to Pololu Servo Controller

    #define Rx                  100   

    SoftwareSerial SerialServoController (Rx,Tx);                 // create SoftwareSerial objects

void setup() {

        Serial.begin(9600);              // Sets data rate in baud for serial data transmission.   

        delay(1000);                         // For StartUp timing issues?

        SerialServoController.begin(9600);   // begin communication on software serial channel  

        delay(1000);                          // For StartUp timing issues?

        pinMode(Rx, INPUT); // setup the software serial pins

        pinMode(Tx, OUTPUT);                               

  } // End Setup

 

I noticed that when I attach the input port form the servo controller to digital pin 1 on the Arduino (hardware serial Tx) the problem is gone.

What am I missing?

Extra question. SotwareSerial is part of the Arduino core. Should there be a Softserial folder in the Arduino directory folder or not? My sketch compiles in both situations; no effect however on my “red led flash servo controller problem”. 

Thanks in advance.

Best regards, Ko

 

Statement "SoftwareSerial

Statement “SoftwareSerial SerialServoController (Rx,Tx)” requires two parameters. Is there a way around? I don’t use Rx, that’s why I use 100 as “dummy value”. I also tried valid values, but that makes no difference.

I experimented with different baudrates (1200, 38400, 4800, 9600,115200), both with the pinMode statements enabled and disabled, but no success.

Why is the error gone if I attach the servo controller pin to Arduino pin 2 (hardware Tx). I think that’s the key. But I don’t understand it and can’t fix it. I think I am doing something wrong @ SoftwareSerial, but what?

The solution is to use a

The solution is to use a modified software serial library posted here: http://forum.arduino.cc/index.php?topic=112013.0