Problems with SoftwareSerial code
hi guys, i've been playing around sample code provided softwareserial library: http://arduino.cc/en/reference/softwareserialexample
but ran bit of problem, when try compile version following error: error: expected primary-expression before '(' token in function 'void setup()':
here code:
i'm running arduino 0018, on mac os x 10.5. ideas? cheers.
but ran bit of problem, when try compile version following error: error: expected primary-expression before '(' token in function 'void setup()':
here code:
code: [select]
#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 mac os x 10.5. ideas? cheers.
code: [select]
#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);
}
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Problems with SoftwareSerial code
arduino
Comments
Post a Comment