Go Down

Topic: . (Read 96 times) previous topic - next topic

cha cha

Aug 06, 2014, 07:08 pm Last Edit: Aug 13, 2014, 01:35 am by cha cha Reason: 1
.

PaulS

Code: [Select]
pinMode(, OUTPUT); //MOTORS
pinMode(, OUTPUT);
pinMode(, OUTPUT);
pinMode(, OUTPUT);
pinMode(, OUTPUT);
pinMode(, OUTPUT);

What is this mess?

Code: [Select]
    case('w'):case('W'):sendCommand();break; // enter values
From this, is appears that sendCommand() takes no arguments.

Code: [Select]
void sendCommand(int m1,int m2, int m3, int m4, int m5, int m6, int s1, int s2, int s3, int s4, int chksum)
From this, it appears that the above statement is a crock of shit.

Quote
Am I on the right track?

No, but even if you were, that train is going to get you.

The first thing you need to consider is exactly what this:
Code: [Select]
  arduino.write(m1);
sends to the serial port. Does it send one byte, as you seem to expect? Does it send more than one byte because an int is bigger than a byte? Or, does the number of bytes sent depend on the value in the int ('4' is one byte, while '1023' is 4 bytes)?


cha cha

#2
Aug 06, 2014, 09:58 pm Last Edit: Aug 13, 2014, 01:36 am by cha cha Reason: 1
.

Go Up