Can I use this digital IR transmitter to control the robot?

I am using Arduino UNO at the robot which attach to Digital IR receiver,
Can I use this Digital IR transmitter attach to Arduino Mega which connect to my computer using USB cable?
So I can control the robot without any cable, what I mean with control is by rotating the motor

The digital Ir transmitter Gravity: Digital IR Transmitter Module - DFRobot
The digital Ir receiver Gravity: Digital IR Receiver Module - DFRobot

Thank you :smiley:

Yes, that IR transmitter should work with that IR receiver.

Yeah I know those both will work together..
But can I use this like remote control that controls rc car?
I am building a robot that has two dc motors, I would like to use IR transmitter to transmit data to IR receiver to rotate the motors, could it possibly be done?

But can I use this like remote control that controls rc car?

If you provide the transmitter with codes your receiver can decode as direction commands, yes you can.

AWOL:

But can I use this like remote control that controls rc car?

If you provide the transmitter with codes your receiver can decode as direction commands, yes you can.

any beginner samples transmitter code which will be decode as direction command?

There's a library linked on the transmitter page. What results did you get when you ran the examples?

PaulS:
There's a library linked on the transmitter page. What results did you get when you ran the examples?

I ran the example after installing the library:
Here is the sample I ran:

/*
 * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
 * An IR LED must be connected to Arduino PWM pin 3.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com
 */
 
#include <IRremote.h>
 
IRsend irsend;
 
void setup()
{
  Serial.begin(9600);
}
 
void loop() {
  if (Serial.read() != -1) {
    for (int i = 0; i < 3; i++) {
      irsend.sendSony(0xa90, 12); // Sony TV power code
      delay(100);
    }
  }
}

I use Arduino 1.0.1 but It display errors:
D:\Final Project\arduino-1.0.1]libraries]IRremote\IRremote.cpp:529:error: 'volatile struct irparams_t' has no member named 'rawlen'

But it works when I use Arduino 0023.

How can I fix these error in Arduino 1.0.1 since my projects is about to use Arduino 1.0 higher.

My first question is why you put a user-downloaded library in the Arduino library directory. That is NOT where it goes.

PaulS:
My first question is why you put a user-downloaded library in the Arduino library directory. That is NOT where it goes.

so where I should put this?
But it works in Arduino 0023.