L293D wont work with IR

I am using my robojax l293d motor driver shield with an ir remote while testing my code, so that I can use my homemade radio remote once I've got IR working.
But sadly I have run into a problem: When I click the button on my IR remote everything prints to the serial monitor correctly but the motor does not run.
I have:
-Made sure my wiring is correct
-tested the motor on just a basic code to run dc motors(It works fine then)
-Checked if I had external power on(I do)
-Checked my wiring dozens of other times
Here's my code:

#include <AFMotor.h>
#include <IRremote.h>
int rp = 6;

IRrecv ir(rp);

decode_results results;
AF_DCMotor m1(1);
AF_DCMotor m2(2);

void setup() {

void loop() {  

if(results.value == 16753245){
  uint8_t i;  
  Serial.println("It should work");
  int speed(int b)
  return map(b, 0, 100, 0, 255);


If you would like to see my wiring just ask - ScientificCrabs

Similar topic here

Is that "1" pin 1?
The pin being used for half of the serial interface?

Edit: OK, found the library, it's not a pin number.

What version of the IRremote library are you using? That code is for an older version (<3.0) of the IRremote library. Look at the IRremote git hub page to see how to use the newer version of the library.

As you can see, in the manual for the shield, pin 6 is used by the shield. Looks like the analog inputs are free, though. The analog inputs are really digital pins with analog in as a special function so you can use one of them for the IR decoder. When used as digital pins they can be referred to as pin 14 - 19 instead of A0 - A5.

Hello, @groundFungus I am using the newest version of the library.
How could I revise my code to work with the newer version, do I have to use analog or can I still use digital?

I provided a link to the instructions on how to make older code work with the new version.

Use a digital pin. Like I said, the analog inputs are digital pins as well as analog inputs.

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