help rotate dc motor by ir remote control

Hello everybody, I want to rotate a one dc motor with ir remote. I want that he rotate clockwise, counter clockwise and he stop when we press three buttons. i’ve try this programm but when I try …
nothing :slightly_frowning_face: :’( Could somebody can help me ? If you want i can put my schema.

#include <IRremote.h>

const byte IR_RECV_PIN = 10;
const byte MOTOR_D_PIN = 2;
const byte MOTOR_G_PIN = 3;

IRrecv irrecv(IR_RECV_PIN);
decode_results results;

void setup() {

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

if(results.value == 0x20df609f) {
digitalWrite(MOTOR_D_PIN, LOW);
digitalWrite(MOTOR_G_PIN, HIGH);

} else if (results.value == 0x20dfe01f) {
digitalWrite(MOTOR_D_PIN, HIGH);
digitalWrite(MOTOR_G_PIN, LOW);

} else if(results.value == 0x20df22dd) {
digitalWrite(MOTOR_D_PIN, LOW);
digitalWrite(MOTOR_G_PIN, LOW);


I want. I also want you to edit that code and put code tags arround it, like it says in the how to use this forum stick post you have not bothers to read.

Sorry but I don't understand what you would say ?