Tamiya Track&Wheel Set 70100 won´t work

C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:3:17: error: stray '\315' in program
int RECV_PIN = 9;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:3:18: error: stray '\276' in program
int RECV_PIN = 9;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:4:24: error: stray '\315' in program
IRrecv irrecv(RECV_PIN);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:4:25: error: stray '\276' in program
IRrecv irrecv(RECV_PIN);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:5:23: error: stray '\315' in program
decode_results results;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:5:24: error: stray '\276' in program
decode_results results;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:6:11: error: stray '\315' in program
int E1 = 6; //M1 Speed Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:6:12: error: stray '\276' in program
int E1 = 6; //M1 Speed Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:7:11: error: stray '\315' in program
int E2 = 5; //M2 Speed Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:7:12: error: stray '\276' in program
int E2 = 5; //M2 Speed Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:8:11: error: stray '\315' in program
int M1 = 8; //M1 Direction Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:8:12: error: stray '\276' in program
int M1 = 8; //M1 Direction Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:9:11: error: stray '\315' in program
int M2 = 7; //M2 Direction Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:9:12: error: stray '\276' in program
int M2 = 7; //M2 Direction Control
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:12:6: error: stray '\315' in program
int i;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:12:7: error: stray '\276' in program
int i;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:13:8: error: stray '\315' in program
for(i=5;i<=8;i++)
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:13:9: error: stray '\276' in program
for(i=5;i<=8;i++)
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:13:14: error: stray '\315' in program
for(i=5;i<=8;i++)
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:13:15: error: stray '\276' in program
for(i=5;i<=8;i++)
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:14:19: error: stray '\315' in program
pinMode(i, OUTPUT);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:14:20: error: stray '\276' in program
pinMode(i, OUTPUT);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:15:19: error: stray '\315' in program
Serial.begin(9600);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:15:20: error: stray '\276' in program
Serial.begin(9600);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:16:20: error: stray '\315' in program
irrecv.enableIRIn(); // Start the receiver
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:16:21: error: stray '\276' in program
irrecv.enableIRIn(); // Start the receiver
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:20:20: error: stray '\315' in program
int leftspeed = 255; //255 is maximum speed
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:20:21: error: stray '\276' in program
int leftspeed = 255; //255 is maximum speed
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:21:21: error: stray '\315' in program
int rightspeed = 255;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:21:22: error: stray '\276' in program
int rightspeed = 255;
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:26:21: error: stray '\315' in program
analogWrite (E1,255);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:26:22: error: stray '\276' in program
analogWrite (E1,255);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:27:22: error: stray '\315' in program
digitalWrite(M1,HIGH);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:27:23: error: stray '\276' in program
digitalWrite(M1,HIGH);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:28:21: error: stray '\315' in program
analogWrite (E2,255);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:28:22: error: stray '\276' in program
analogWrite (E2,255);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:29:22: error: stray '\315' in program
digitalWrite(M2,HIGH);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:29:23: error: stray '\276' in program
digitalWrite(M2,HIGH);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:30:12: error: stray '\315' in program
delay(1000);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:30:13: error: stray '\276' in program
delay(1000);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:32:21: error: stray '\315' in program
digitalWrite(E1,LOW);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:32:22: error: stray '\276' in program
digitalWrite(E1,LOW);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:33:21: error: stray '\315' in program
digitalWrite(E2,LOW);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:33:22: error: stray '\276' in program
digitalWrite(E2,LOW);
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:34:16: error: stray '\315' in program
irrecv.resume(); // Receive the next value
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:34:17: error: stray '\276' in program
irrecv.resume(); // Receive the next value
^
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:4:1: error: expected ',' or ';' before 'IRrecv'
IRrecv irrecv(RECV_PIN);
^~~~~~
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino: In function 'void loop()':
C:\Users\zjay\Documents\Arduino\sketch_may3b\sketch_may3b.ino:21:1: error: expected ',' or ';' before 'int'
int rightspeed = 255;
^~~

exit status 1

Compilation error: stray '\315' in program

I´ve copied the code from the instruction manual and after I send it to the Arduino Mega this error message came. I would appreciate some help.

can you show us the code you're using with the < CODE > button

There is an error in the code you did not post.

These kinds of problems happen most often when you copy text from a web page. The Copy & Paste picks up some invisible formatting characters that the compiler doesn't understand. Does the manual point to somewhere you can download the source code?

@leonzjay

Your Tamiya Track and Wheel Set 70100 acts just like the Electric Turtle, having the same components and therefore; programming. Here is a web page (for assembling) the track and wheel set that also has the component wiring diagram.

If you follow the trail through the Tamiya web site (the product is so old, their page has only an image, but no link to a page) you will also find the Tamiya Turtle sketch/code.

The devices in the Tamiya Track and Wheel set are:

  • two dc motors (and two-wire motor driver boards - speed and direction)
  • one servo
  • two SR-HC04
  • one IR receiver

I reconstructed the sample sketch from the errors you received:

#include<IRremote.h>
#include<Servo.h>

int RECV_PIN = 9;
IRrecv irrecv(RECV_PIN);
decode_results results;

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);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  int leftspeed = 255; //255 is maximum speed
  int rightspeed = 255;

  analogWrite (E1, 255);
  digitalWrite(M1, HIGH);
  analogWrite (E2, 255);
  digitalWrite(M2, HIGH);

  delay(1000);

  digitalWrite(E1, LOW);
  digitalWrite(E2, LOW);
  irrecv.resume(); // Receive the next value
}

WHICH can be completely re-constructed by using the Electric Turtle code in Basic Stamp code... and here it is!

symbol dangerlevel = 120 
symbol turn = 500 
symbol servo_turn = 500 

main: 
gosub ping

if W0 > dangerlevel then
gosub nodanger
else 
gosub whichway 
end if
goto main 

nodanger:
high 5 : high 6 : low 4 : low 7
return

whichway:
gosub totalhalt 
gosub lturn 
pause servo_turn 
gosub totalhalt
gosub ping
gosub rturn 

pause servo_turn 

gosub totalhalt
gosub ping2

if W0<W1 then
gosub body_lturn
else
gosub body_rturn
end if
return

body_lturn:
	high 6 : low 5 : low 7 : high 4 
	pause turn : gosub totalhalt
	return

body_rturn:
	high 5 : low 6 : low 4 : high 7 
	pause turn : gosub totalhalt
	return

rturn:
	servo 0, 100 
	return

lturn:
	servo 0, 200 
	return

totalhalt:
	low 4 : low 5 : low 6 : low 7 
	Servo 0,150 
	pause 100 
	return

ping:			
	LOW PORTC 0 
	HIGH PORTC 0
	pause 1
	LET DIRSC = %00000000
	PULSIN 0, 1, W0
	pause 40 		‘ short delay
	return

ping2:			
	LOW PORTC 0 
	HIGH PORTC 0
	pause 1
	LET DIRSC = %00000000
	PULSIN 0, 1, W1
	pause 40 		‘ short delay
	return

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.