Hi!
I have problems with all the sketches from the manual. None works in the review. I have very little idea of Arduino and at least wanted to get the mini rover to move, but that doesn’t work. As an example here the simplest sketch.
Similar errors for all skatech.
int E1 = 6; //M1 Speed Control
int E2 = 5; //M2 Speed Control
int M1 = 8; //M1 Direction Control
int M2 = 7; //M2 Direction Control
void setup()
{
int i;
for(i=5;i<=8;i++)
pinMode(i, OUTPUT);
Serial.begin(9600);
}
void loop()
{
int leftspeed = 255; //255 is maximum speed
int rightspeed = 255;
analogWrite (E1,255);
digitalWrite(M1,LOW);
analogWrite (E2,255);
digitalWrite(M2,LOW);
delay(100);
}
PROBLEMS
sketch_jun04c:7:10: error: stray '\315' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:8:5: note: in expansion of macro 'i'
for(i=5;i<=8;i++)
^
sketch_jun04c:7:11: error: stray '\276' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:8:5: note: in expansion of macro 'i'
for(i=5;i<=8;i++)
^
sketch_jun04c:8:8: error: stray '\315' in program
for(i=5;i<=8;i++)
^
sketch_jun04c:8:9: error: stray '\276' in program
for(i=5;i<=8;i++)
^
sketch_jun04c:7:10: error: stray '\315' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:8:10: note: in expansion of macro 'i'
for(i=5;i<=8;i++)
^
sketch_jun04c:7:11: error: stray '\276' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:8:10: note: in expansion of macro 'i'
for(i=5;i<=8;i++)
^
sketch_jun04c:8:14: error: stray '\315' in program
for(i=5;i<=8;i++)
^
sketch_jun04c:8:15: error: stray '\276' in program
for(i=5;i<=8;i++)
^
sketch_jun04c:7:10: error: stray '\315' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:8:16: note: in expansion of macro 'i'
for(i=5;i<=8;i++)
^
sketch_jun04c:7:11: error: stray '\276' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:8:16: note: in expansion of macro 'i'
for(i=5;i<=8;i++)
^
sketch_jun04c:7:10: error: stray '\315' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:9:9: note: in expansion of macro 'i'
pinMode(i, OUTPUT);
^
sketch_jun04c:7:11: error: stray '\276' in program
#define i;
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:9:9: note: in expansion of macro 'i'
pinMode(i, OUTPUT);
^
sketch_jun04c:9:19: error: stray '\315' in program
pinMode(i, OUTPUT);
^
sketch_jun04c:9:20: error: stray '\276' in program
pinMode(i, OUTPUT);
^
sketch_jun04c:10:19: error: stray '\315' in program
Serial.begin(9600);
^
sketch_jun04c:10:20: error: stray '\276' in program
Serial.begin(9600);
^
sketch_jun04c:1:15: error: stray '\315' in program
#define E1 = 6; //M1 Speed Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:14:14: note: in expansion of macro 'E1'
analogWrite (E1,255);
^~
sketch_jun04c:1:16: error: stray '\276' in program
#define E1 = 6; //M1 Speed Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:14:14: note: in expansion of macro 'E1'
analogWrite (E1,255);
^~
sketch_jun04c:14:21: error: stray '\315' in program
analogWrite (E1,255);
^
sketch_jun04c:14:22: error: stray '\276' in program
analogWrite (E1,255);
^
sketch_jun04c:3:15: error: stray '\315' in program
#define M1 = 8; //M1 Direction Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:15:14: note: in expansion of macro 'M1'
digitalWrite(M1,LOW);
^~
sketch_jun04c:3:16: error: stray '\276' in program
#define M1 = 8; //M1 Direction Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:15:14: note: in expansion of macro 'M1'
digitalWrite(M1,LOW);
^~
sketch_jun04c:15:21: error: stray '\315' in program
digitalWrite(M1,LOW);
^
sketch_jun04c:15:22: error: stray '\276' in program
digitalWrite(M1,LOW);
^
sketch_jun04c:2:15: error: stray '\315' in program
#define E2 = 5; //M2 Speed Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:16:14: note: in expansion of macro 'E2'
analogWrite (E2,255);
^~
sketch_jun04c:2:16: error: stray '\276' in progra
#define E2 = 5; //M2 Speed Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:16:14: note: in expansion of macro 'E2'
analogWrite (E2,255);
^~
sketch_jun04c:16:21: error: stray '\315' in program
analogWrite (E2,255);
^
sketch_jun04c:16:22: error: stray '\276' in program
analogWrite (E2,255);
^
sketch_jun04c:4:15: error: stray '\315' in program
#define M2 = 7; //M2 Direction Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:17:14: note: in expansion of macro 'M2'
digitalWrite(M2,LOW);
^~
sketch_jun04c:4:16: error: stray '\276' in program
#define M2 = 7; //M2 Direction Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:17:14: note: in expansion of macro 'M2'
digitalWrite(M2,LOW);
^~
sketch_jun04c:17:21: error: stray '\315' in program
digitalWrite(M2,LOW);
^
sketch_jun04c:17:22: error: stray '\276' in program
digitalWrite(M2,LOW);
^
sketch_jun04c:18:11: error: stray '\315' in program
delay(100);
^
sketch_jun04c:18:12: error: stray '\276' in program
delay(100);
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino: In function 'void setup()':
sketch_jun04c:8:6: error: expected primary-expression before '=' token
for(i=5;i<=8;i++
^
sketch_jun04c:8:17: error: lvalue required as increment operand
for(i=5;i<=8;i++)
^~
sketch_jun04c:11:1: error: expected primary-expression before '}' token
}
^
sketch_jun04c:11:1: error: expected ';' before '}' token
sketch_jun04c:11:1: error: expected primary-expression before '}' token
sketch_jun04c:11:1: error: expected ')' before '}' token
sketch_jun04c:11:1: error: expected primary-expression before '}' token
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino: In function 'void loop()':
sketch_jun04c:1:12: error: expected primary-expression before '=' token
#define E1 = 6; //M1 Speed Control
^
C:\Users\marko\Documents\Arduino\sketch_jun04c\sketch_jun04c.ino:14:14: note: in expansion of macro 'E1
analogWrite (E1,255);
^~
exit status 1
stray '\315' in program
Thank you so much in advance for your help!