Help with my robot!!!

Hi good afternoon could you guys help me with my robot using Arduino? Heres my code, im using an IR receiver:

#include <Arduino.h>
#include <NECIRrcv.h>
#define IRPIN 3
int ledv = 1;
int ledr = 2;
int mb1 = 4;
int mb2 = 5;
int pwmb = 6;
int stbyb = 7;
int ma1 = 8;
int ma2 = 9;
int pwma = 10;
int stbya = 11;
static int aux ;
NECIRrcv ir(IRPIN) ;
#define ADELANTE 3944021760
#define ATRAS 4010868480
#define DERECHA 3843751680
#define IZQUIERDA 3860463360
#define STOP 3877175040
#define ON 4161273600
#define OFF 4177985280

void setup()
{
pinMode(ledv, OUTPUT);
pinMode(ledr,OUTPUT);
pinMode(mb1, OUTPUT);
pinMode(mb2,OUTPUT);
pinMode(pwmb,OUTPUT);
pinMode(stbyb,OUTPUT);
pinMode(ma1, OUTPUT);
pinMode(ma2,OUTPUT);
pinMode(pwma,OUTPUT);
pinMode(stbya,OUTPUT);
ir.begin() ;
}
void loop()
{
unsigned long ircode ;
while (ir.available()) {
ircode = ir.read() ;
if(ircode == ON or aux == 1){
digitalWrite(ledv,HIGH);
digitalWrite(ledr,LOW);
aux = 1 ;
if(aux == 1){
if(ircode == ADELANTE) adelante();
if(ircode == ATRAS) atras ();
if(ircode == DERECHA) derecha();
if(ircode == IZQUIERDA) izquierda();
if(ircode == STOP) alto ();

if(ircode == OFF){
digitalWrite(ledv,LOW);
digitalWrite(ledr,HIGH);
digitalWrite(ma1,LOW);
digitalWrite(ma2,LOW);
digitalWrite(mb1,LOW);
digitalWrite(mb2,LOW);
aux = 0 ;
}
}
}
else if(ircode == OFF or aux == 0){
digitalWrite(ledv,LOW);
digitalWrite(ledr,HIGH);
aux = 0 ;
if(ircode == ON){
digitalWrite(ledv,HIGH);
digitalWrite(ledr,LOW);
aux = 1 ;
}
}
}
}
void adelante(){
digitalWrite(ma1,HIGH);
digitalWrite(ma2,LOW);
digitalWrite(pwma,255);
digitalWrite(mb1,HIGH);
digitalWrite(mb2,LOW);
digitalWrite(pwmb,255);
}
void atras(){
digitalWrite(ma1,LOW);
digitalWrite(ma2,HIGH);
digitalWrite(pwma,255);
digitalWrite(mb1,LOW);
digitalWrite(mb2,HIGH);
digitalWrite(pwmb,255);

}
void derecha(){
digitalWrite(ma1,LOW);
digitalWrite(ma2,HIGH);
analogWrite(pwma,255);
digitalWrite(mb1,HIGH);
digitalWrite(mb2,LOW);
analogWrite(pwmb,255);

}
void izquierda(){
digitalWrite(ma1,HIGH);
digitalWrite(ma2,LOW);
analogWrite(pwma,255);
digitalWrite(mb1,LOW);
digitalWrite(mb2,HIGH);
analogWrite(pwmb,255);

}
void alto(){
digitalWrite(ma1,LOW);
digitalWrite(ma2,LOW);
digitalWrite(mb1,LOW);
digitalWrite(mb2,LOW);
}

What exactly are you looking for help with? (just the code? what is this robots purpose?)

7 below:

http://forum.arduino.cc/index.php/topic,148850.0.html

Your ir codes need to be defined as long constants -

#define DERECHA 3843751680L

You have functions for void adelante, atras, and so on - why not also have a function for off? It keeps things consistent.

      aux = 1 ;
      if(aux == 1){

If you unconditionally set aux to 1, and then check whether it is 1, then the check will always be true and is unnecessary.

  if(ircode == ON or aux == 1){
      // BLOCK A
  }
  else if(ircode == OFF or aux == 0){
      // BLOCK B
      if(ircode == ON){
        // BLOCK C
      }
  }
 }

BLOCK A is executed if ircode==on or if aux == 1. This means that BLOCK B only gets executed if ircode is OFF AND aux ==0. this means that BLOCK C is never executed.

Furthermore, this code will not compile unless someone has #defined 'or' to be '||'. That being the case, this person has copy-and-pasted a chunk of code they themselves did not write, and simply doesn't know what to do next. Hence the lack of detail in the request for help.

Dude - work your way through the examples in the IDE.