Problems with SoftwareSerial code

Hi guys, I've been playing around with the sample code provided for the SoftwareSerial library: Arduino - Home

But I ran into a bit of a problem, when I try to compile my version I get the following error: error: expected primary-expression before '(' token In function 'void setup()':

Here is my code:

#include <SoftwareSerial.h>
int servopulse1 = 1250; 
.....
#define txPin  7;

SoftwareSerial mySerial =  SoftwareSerial(txPin);
byte pinState = 0;  
 
void setup()  
{ 
  pinMode(txPin, OUTPUT);
  ...........   
  mySerial.begin(9600);
}

I'm running Arduino 0018, on a MAC OS X 10.5. Any ideas? Cheers.

#include <SoftwareSerial.h>
int servopulse1 = 1250;
[glow].....[/glow]
#define txPin  7[glow];[/glow]

SoftwareSerial mySerial =  SoftwareSerial(txPin);
byte pinState = 0;  

void setup()  
{
  pinMode(txPin, OUTPUT);
  [glow]...........  [/glow]  mySerial.begin(9600);
}

Hi Groove, could you please expand on that? :slight_smile: The dots are just to replace bits of code that are irrelevant to my problem. Guess I should have used the // instead.

No, the semicolon is a dot and a comma that shouldn't be there.

Yep got it. Cheers. Additionally I realized that SoftwareSerial(); takes two parameters.