Go Down

Topic: Can I use this digital IR transmitter to control the robot? (Read 1 time) previous topic - next topic

creativen

Sep 25, 2012, 08:05 pm Last Edit: Sep 25, 2012, 08:11 pm by creativen Reason: 1
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 http://www.dfrobot.com/index.php?route=product/product&filter_name=DIGITAL%20IR%20TRANSMITTER&product_id=355#.UGHxn1GMGNI
The digital Ir receiver http://www.dfrobot.com/index.php?route=product/product&filter_name=DIGITAL%20IR%20receiver&product_id=351#.UGHyQ1GMGNI

Thank you  :D

johnwasser

Yes, that IR transmitter should work with that IR receiver.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

creativen

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?

AWOL

Quote
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.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

creativen


Quote
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?

PaulS

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

creativen


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:
Code: [Select]
/*
* 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.

PaulS

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

creativen


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.

Go Up