Pages: [1]   Go Down
Author Topic: 2 questions wrt pololu and newsoftserial  (Read 519 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 1
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello:

I have the pololu servo controller working with Serial - no issues. I'd like to use NewSoftSerial and use a different pin for output, but no matter what I try, I get the red LED on and flashing green (baud rate too high). Stumped - is there a compatibility issue? I am setting the baud rate to 9600 - same as for Serial.

When using Serial, after some time of no output changes, the yellow light comes on and the servo moves slightly - can anyone tell me what's going on here?

Any help is appreciated.

Cheers,

b...

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do you have the controller connected?

What code are you running on the Arduino?
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello -

I am running version 0020, hooked to a pololu servo controller. Everything works fine when I use Serial but I'm trying to move to SoftwareSerial or NewSoftwareSerial. Using SoftwareSerial, I have added:

Code:
SoftwareSerial sss = SoftwareSerial(2, 3);

In the setup function:

Code:
pinMode(2, INPUT);
pinMode(3, OUTPUT);
digitalWrite(3, HIGH);
sss.begin(9600);

And then in the function that outputs the bytes:

Code:
for(int i = 0; i < 6; i++)
{
      Serial.print(buff[i], BYTE);
      sss.print(buff[i], BYTE);
}

If I connect the pololu SIN to pin1 (TX) everything is fine. If I change the SIN wire to pin3 (output for sss) then when the arduino powers up, I get the red light and flashing green (before any calls to move the motor - this is just on power up).

I had the same experience with NewSoftwareSerial.

Logged

Pages: [1]   Go Up
Jump to: