MOTOR NSS CODING HELP !!!!!!!!!!!!!

i am using the arduino to controll the pololu low voltage dual serial motor controller, and im am getting an error labeled "within this context" on

 motor.write(BYTE)0x80); // command

This is my whole entire sketch

this is my whole sketch- 
Code:
#include <NewSoftSerial.h> // includes the library for serial data transfers


#define txPin 2 // states what pin transmits the data to the pololu controller
#define rstPin 3 // states what pin is used a reset,which puts the controller to a defualt, all motors off state
#define rxPin 4 // this pin is used to recive data and is required, however it is unused in this sketch

NewSoftSerial motor(rxPin, txPin); // this shows what pins that are defined will be used with the New Soft Serial interface

void setup()  { 
  pinMode(rstPin, OUTPUT); // this shows that the reset pin set to transfer, and not to recive electricity.
   motor.begin(9600); // this begins a NSS interface named "motor"
   digitalWrite(4, HIGH); // this causes electrical current to flow on the reset pin, which in turn prevents the motor controller from random reset
  delay(500);
}
 void loop()  {
 
  motor.write(BYTE)0x80); // command
  motor.write(BYTE)0x00); // device number
  motor.write(BYTE)0x03); // motor 2 backward
  motor.write(BYTE)0x7F); // full speed
  delay(2000);
}

((BYTE)x);

Now with that code, it states expected ) before numberic constant, here is what i changed

}
 void loop()  {
 
  motor.write((BYTE)0x80); // command
  motor.write((BYTE)0x00); // device number
  motor.write((BYTE)0x03); // motor 2 backward
  motor.write((BYTE)0x7F); // full speed
  delay(2000);
}

BYTE and byte are not the same thing. One is a constant, the other is a type. Use (byte) to cast the constants to the type.

if i do this code, it gives me "within this context" error again, here is the changed lines

  motor.write((byte)0x80); // command
  motor.write((byte)0x00); // device number
  motor.write((byte)0x03); // motor 2 backward
  motor.write((byte)0x7F); // full speed

This compiles:

void loop()
{
  motor.print(0x80, BYTE); // command
  motor.print(0x00, BYTE); // device number
  motor.print(0x03, BYTE); // motor 2 backward
  motor.print(0x7F, BYTE); // full speed
  delay(2000);
}

The write method is private. You can't call it from outside of a class method. You can only call public methods.

This code gives me the the "no matching function to 'newsoflserial::write(int,int)' " error

#include <NewSoftSerial.h> // includes the library for serial data transfers


#define txPin 2 // states what pin transmits the data to the pololu controller
#define rstPin 3 // states what pin is used a reset,which puts the controller to a defualt, all motors off state
#define rxPin 4 // this pin is used to recive data and is required, however it is unused in this sketch

NewSoftSerial motor(rxPin, txPin); // this shows what pins that are defined will be used with the New Soft Serial interface

void setup()  { 
  pinMode(rstPin, OUTPUT); // this shows that the reset pin set to transfer, and not to recive electricity.
   motor.begin(9600); // this begins a NSS interface named "motor"
   digitalWrite(4, HIGH); // this causes electrical current to flow on the reset pin, which in turn prevents the motor controller from random reset
  delay(500);
}
 void loop()  {
 
  motor.write(0x80, BYTE); // command
  motor.write(0x00, BYTE); // device number
  motor.write(0x03, BYTE); // motor 2 backward
  motor.write(0x7F, BYTE); // full speed
  delay(2000);
}

I don't think write is applicable for the second parameter. Either try to simply remove BYTE or change write to print.

now with this setup it compiles, however the lights on the motor controller show nothing.

 void loop()  {
 
  motor.print(0x80, BYTE); // command
  motor.print(0x00, BYTE); // device number
  motor.print(0x03, BYTE); // motor 2 backward
  motor.print(0x7F, BYTE); // full speed
  delay(2000);
}

this is the changed code above

Did you try write with nothing but the value?

yes, when i do that it gives me the "within this context error again, this is the code with just write and values changed

}
 void loop()  {
 
  motor.write(0x80); // command
  motor.write(0x00); // device number
  motor.write(0x03); // motor 2 backward
  motor.write(0x7F); // full speed
  delay(2000);
}

What do you need help with. Quit the whining and be specific. It looks to me like you didn't read reply #5.

i read your reply 5, and that code did not compile, it gave the within this context error, so then when the other guy said to use motor.print, it compiled just fine however, the motor controller i am trying to communicate with shows no status LEDs blink at all so that means the motor controller and arduino arent comunicating properly, i spoke with people at pololu and they said it is wired correctly so the issue is the software, thats what i need help on, i just want to get the controller to comunicate

Well, it looks to me like you are still trying to call the NewSoftSerial::write() method, which is a private method that you can not call.

Post all of your current code that compiles.

This is the code that i could get to compile.

#include <NewSoftSerial.h> // includes the library for serial data transfers


#define txPin 5 // states what pin transmits the data to the pololu controller
#define rstPin 6 // states what pin is used a reset,which puts the controller to a defualt, all motors off state
#define rxPin 4 // this pin is used to recive data and is required, however it is unused in this sketch

NewSoftSerial motor(rxPin, txPin); // this shows what pins that are defined will be used with the New Soft Serial interface

void setup()  { 
  pinMode(rstPin, OUTPUT); // this shows that the reset pin set to transfer, and not to recive electricity.
   motor.begin(9600); // this begins a NSS interface named "motor"
   digitalWrite(4, HIGH); // this causes electrical current to flow on the reset pin, which in turn prevents the motor controller from random reset
  delay(500);
}
 void loop()  {
 
  motor.print(0x80, BYTE); // command
  motor.print(0x00, BYTE); // device number
  motor.print(0x03, BYTE); // motor 2 backward
  motor.print(0x7F, BYTE); // full speed
  delay(2000);
}
   digitalWrite(4, HIGH); // this causes electrical current to flow on the reset pin, which in turn prevents the motor controller from random reset

It does no such thing. It screws with the pin you are trying to do so software serial communications on.

You assigned the pins names. Why aren't you using the names?

ok, i removed that line, and still there are no status LED blinkers on the motor controller, i think i am missing the configuration data for the controller in my sketch however i have no clue how to implement that

Did you choose the right number in the begin() ?

yes, the motor controller is capable of running at between 1200 19200 baud, and the controller auto-detects the buad rate. All i want really is an example code for this motor controller that works well. i just need a simple one, that makes the motors move in one direction on the 2 motor setup.

Post a link to the motor controller you are using, and a schematic of how it is connected to the Arduino, along with a high resolution, in focus, picture that illustrates that the connection is as your schematic shows.