Digite aqui o Código do Robô seguidor de Linha!!
Int AIA = 9; // (pwm) pino 9 conectado ao pino A-IA do módulo
Int AIB = 8; // (pwm) pino 8 conectado ao pino A-IB do módulo
Int BIA = 7; // (pwm) pino 7 conectado ao pino B-IA do módulo
Int BIB = 6; // (pwm) pino 6 conectado ao pino B-IB do módulo
byte frente=255;
byte voltar=200;
byte speed1=255;
byte speed2=255;// Mude este valor (0-255) para controlar a velocidade dos motores
byte speedv1=255;
byte speedv2=255;
byte sensor2=12;//Pino que deve se conectar a saída (out) do sensor
byte sensor1=11;//Pino que deve se conectar a saída (out) do sensor
void setup() {
pinMode(AIA,OUTPUT);//Colocando os pinos como saída
pinMode(AIB,OUTPUT);
pinMode(BIA,OUTPUT);
pinMode(BIB, OUTPUT);
}
void loop() {
if(!digitalRead(sensor2))
{
speed2=frente;
speedv2=0
}else{
speed2=0
speedv2=voltar;
}
if(!digitalRead)sensor1))
{
speed1=frente;
speedv1=0
}else{
speed1=0;
speedv1=voltar;
}
frententeroda1();
frententeroda2();
}
void frententeroda1();
{
analogWrite(AIA, speed1);
analogWrite(AIB, speedv1);
}
void frententeroda2()
{
analogWrite(BIA, speed2);
analogWrite(AIB, speedv2);
}
sketch_dec07a:1: error: 'Int' does not name a type
sketch_dec07a:2: error: 'Int' does not name a type
sketch_dec07a:3: error: 'Int' does not name a type
sketch_dec07a:4: error: 'Int' does not name a type
sketch_dec07a.ino: In function 'void setup()':
sketch_dec07a:15: error: 'AIA' was not declared in this scope
sketch_dec07a:16: error: 'AIB' was not declared in this scope
sketch_dec07a:17: error: 'BIA' was not declared in this scope
sketch_dec07a:18: error: 'BIB' was not declared in this scope
sketch_dec07a.ino: In function 'void loop()':
sketch_dec07a:31: error: expected `;' before '}' token
sketch_dec07a:35: error: expected `;' before 'speedv2'
sketch_dec07a:40: error: expected `;' before ')' token
sketch_dec07a:56: error: 'frententeroda1' was not declared in this scope
sketch_dec07a.ino: At global scope:
sketch_dec07a:64: error: expected unqualified-id before '{' token
sketch_dec07a.ino: In function 'void frententeroda2()':
sketch_dec07a:77: error: 'BIA' was not declared in this scope
sketch_dec07a:79: error: 'AIB' was not declared in this scope
int AIA = 9; // (pwm)pino 9 conectado ao pino A-IA do Módulo
int AIB = 8; // (pwm) pino 8 conectado ao pino B-IA do Módulo
int BIA = 7; // (pwm) pino 7 conectado ao pino B-IA do Módulo
int BIB = 6; // (pwm) pino 6 conectado ao pino B-IB do módulo
byte frente=225;
byte voltar=200;
byte speed1= 255;
byte speed2 = 255;//mude este valor(0-255) para controlar a velocidade dos motores
byte speedv1 = 255;
byte speedv2 = 255;
byte sensor2 = 255;//pino que deve se conectara saída (out) do sensor
byte sensor2 = 255;//pino que deve se conectara saída (out) do sensor
void setup() {
pinMode(AIA,OUTPUT);// colocando os pinos como saída
pinMode(AIB,OUTPUT);
pinMode(BIA,OUTPUT);
pinMode(BIB,OUTPUT);
}
void loop() {
if(!digitalRead(sensor2))
{
speed2=frente;
speedv2=0;
}else{
speed2=0;
speedv2=voltar;
}
if(!digitalRead(sensor1))
{
speed1=frente;
speedv1=0;
}else{
speed1=0
speedv1=voltar;
}
frententeroda1();
frententeroda2();
}
void frententeroda1()
{
analogWrite(AIA,speed2);
analogWrite(AIB,speedv1);
}
void frententeroda2()
{
analogWrite(BIA,speed2);
analogWrite(BIB,speedv2);
}
int AIA = 9; // (pwm) pino 9 conectado ao pino A-IA do Módulo
int AIB = 8, // (pwm) pino 8 conectado ao pino A-IB do Módulo
int AIB = 7, // (pwm) pino 7 conectado ao pino B-IA do Módulo
int AIB = 6, // (pwm) pino 6 conectado ao pino B-IB do Módulo
byte frente=255;
byte voltar=200;
byte speed1 = 255;
byte speed2 = 255;// Mude este valor (0-255) para controlar a velocidade dos motores
byte speedv1 = 255;
byte speedv2 = 255;
byte sensor2 = 12;//pino que deve se conectar a saída (out) do sensor
byte sensor1 = 11;//pino que deve se conectar a saída (out) do sensor
void setup() {
pinMode(AIA, OUTPUT); // Colocando os pinos como saída
pinMode(AIB, OUTPUT);
pinMode(BIA, OUTPUT);
pinMode(BIB, OUTPUT);
}
void loop() {
if(!digitalRead(sensor2))
{
speed2=frente;
speedv2=0;
}else{
speed2=0;
speedv2=voltar
}
if(!digitalRead(sensor1))
{
speed1=frente;
speedv1=0;
}else{
speed1=0;
speedv1=voltar;
}
fretenteroda1();
fretenteroda2();
}
void fretenteroda1()
{
analogWrite(AIA, speed1);
analogWrite(AIB, speedv1);
}
void fretenteroda2()
{
analogWrite(BIA, speed2);
analogWrite(BIB, speedv2);
}
sketch_dec07c:5: error: expected unqualified-id before 'int'
sketch_dec07c.ino: In function 'void setup()':
sketch_dec07c:31: error: 'BIA' was not declared in this scope
sketch_dec07c:33: error: 'BIB' was not declared in this scope
sketch_dec07c.ino: In function 'void loop()':
sketch_dec07c:43: error: 'frente' was not declared in this scope
sketch_dec07c:53: error: expected `;' before '}' token
sketch_dec07c:59: error: 'frente' was not declared in this scope
sketch_dec07c.ino: In function 'void fretenteroda2()':
sketch_dec07c:91: error: 'BIA' was not declared in this scope
sketch_dec07c:93: error: 'BIB' was not declared in this scope
int AIA = 9;// (pwm) pino 9 conectado ao pino A-IA do Módulo
int AIB = 8; // ((pmw) pino 8 conectado ao pino A-IB do Módulo
int BIA = 7; // (pmw) pino 7 conectado ao pino B-ia do Módulo
int BIB = 6; // (pmw) pino 6 conectado ao pino B-BI do Módulo
byti frente=255;
byti voltar=200;
byti speed1 = 255;
byti spped2 = 255;// Mude este valor 90-255) para controlar a velocidade dos motores
byti sppedv1 = 255;
byti sppedv2 = 255;
byti sensor2 = 12;// Pino que deve se conectar a saída (out) do sensor
byti sensor1 = 11;// Pino que deve se conectara saída (out) do sensor
void setup() {
pinMode(AIA,OUTUP); // colocado pinos como saída
pinMode(AIB,OUTUP);
pinMode(BIA,OUTUP):
pinMode(BIB,OUTUP);
}
void loop() {
if(!dijitalRead(sensor2)
{
speed2=frente;
speedv2=0;
}else{
speed2=voltar
}
if(!digitalRead(sensor1)
}
speed1=frente;
speed1=0;-}else{speed1=0
;
speed1=voltar;
}
frententeroda1();
frententeroda2();
}
voidfrennteroda1()
{
analogWrite(AIA, speed1);
analoWrite(AIB, speedv1); } void frententeroda2()
{
analogWrite(BIA, speed2);
analogWrite(BIB,speed2):
}
sketch_dec07d:9: error: 'byti' does not name a type
sketch_dec07d:11: error: 'byti' does not name a type
sketch_dec07d:13: error: 'byti' does not name a type
sketch_dec07d:15: error: 'byti' does not name a type
sketch_dec07d:17: error: 'byti' does not name a type
sketch_dec07d:19: error: 'byti' does not name a type
sketch_dec07d:21: error: 'byti' does not name a type
sketch_dec07d:23: error: 'byti' does not name a type
sketch_dec07d.ino: In function 'void setup()':
sketch_dec07d:27: error: 'OUTUP' was not declared in this scope
sketch_dec07d:31: error: expected `;' before ':' token
sketch_dec07d.ino: In function 'void loop()':
sketch_dec07d:39: error: 'sensor2' was not declared in this scope
sketch_dec07d:39: error: 'dijitalRead' was not declared in this scope
sketch_dec07d:41: error: expected `)' before '{' token
sketch_dec07d:55: error: expected primary-expression before '}' token
sketch_dec07d:55: error: expected `;' before '}' token
sketch_dec07d.ino: At global scope:
sketch_dec07d:57: error: expected constructor, destructor, or type conversion before '=' token
sketch_dec07d:59: error: expected constructor, destructor, or type conversion before '=' token
sketch_dec07d:59: error: expected unqualified-id before '-' token
sketch_dec07d:59: error: expected declaration before '}' token
int AIA = 9; // (pwm) pino 9 conectado ao pino A-IA do M�dulo
int AIB = 8; // (pwm) pino 8 conectado ao pino A-IB do M�dulo
int BIA = 7; // (pwm) pino 7 conectado ao pino B-IA do M�dulo
int BIB = 6; // (pwm) pino 6 conectado ao pino B-IB do M�dulo
byte frente=255;
byte voltar=200;
byte speed1 = 255;
byte speed2 = 255;// Mude este valor (0-255) para controlar a velocidade dos motores
byte speedv1 = 255;
byte speedv2 = 255;
byte sensor2 = 12;//Pino que deve se conectar a sa�da (out) do sensor
byte sensor1 = 11; //Pino que deve se conectar a sa�da (out) do sensor
void setup() {
pinMode(AIA, OUTPUT); // Colocando os pinos como sa�da
pinMode(AIB, OUTPUT);
pinMode(BIA, OUTPUT);
pinMode(BIB, OUTPUT);
}
void loop() {
if(!digitalRead(sensor2))
{
speed2=frente;
speedv2=0;
}else{
speed2=0;
speedv2=voltar;
}
if(!digitalRead(sensor1))
{
speed1=frente;
speedv1=0;
}else{
speed1=0;
speedv1=voltar;
}
fretenteroda1();
fretenteroda2();
}
void fretenteroda1()
{
analogWrite(AIA, speed1);
analogWrite(AIB, speedv1);
}
void fretenteroda2()
{
analogWrite(BIA, speed2);
analogWrite(BIB, speedv2);
}