Help cross check code

#include <IRremote.h>
const int RECV_PIN=5;

#define code1 0xFF18E7 //button 2
#define code2 0xFF4AB5//button 8
#define code3 0xFF10EF //button 4
#define code4 0xFF5AA5 //button 6
#define code5 0xFF38C7 //button 5

IRrecv irrecv(RECV_PIN);
decode_results results;
int in1 = 7;
int in2 = 8;
int ENA = 9;

int in3 = 10;
int in4 = 11;
int ENB = 12;
void setup()
{
irrecv.enableIRIn();
pinMode (in1,OUTPUT);
pinMode (in2,OUTPUT);
pinMode (ENA,OUTPUT);
pinMode (in3,OUTPUT);
pinMode (in4,OUTPUT);
pinMode (ENB,OUTPUT);
irrecv.enableIRIn();
irrecv.blink13(true);
}

void loop() {
if (irrecv.decode (&results))

switch (results.value){
case code1:
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
analogWrite(ENA,255);
analogWrite(ENA,255);
break;
case code2:
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
analogWrite(ENA,255);
analogWrite(ENA,255);
break;

case code3:
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
analogWrite(ENA,255);
analogWrite(ENA,255);
break;

case code4:
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
analogWrite(ENA,255);
analogWrite(ENA,255);
break;

case code5:
digitalWrite(in1,LOW);
digitalWrite(in2,LOW);
digitalWrite(in3,LOW);
digitalWrite(in4,LOW);
analogWrite(ENA,0);
analogWrite(ENA,0);
break;
}
irrecv.resume();
}

Please edit you code to use code-tags. See "How to use the forum".

Next, what is the problem?

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What model Arduino are you using?

Thanks.. Tom.. :slight_smile:

Yes, I'm very cross.

HTH

Yep, it looks like code.

Romonaga:
Yep, it looks like improperly posted code.

Fixed that for you :wink:

Help cross check code

Before posting a question here please run your program.

If it works properly there will be no need to ask a question.

If it does not work properly then by telling us exactly what it does do and what you want it to do that is different you will be providing a lot of useful information with which to help you.

The Arduino system is great for learning-by-doing

...R