Pages: [1]   Go Down
Author Topic: Can I use this digital IR transmitter to control the robot?  (Read 1286 times)
0 Members and 1 Guest are viewing this topic.
universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-grin
« Last Edit: September 25, 2012, 01:11:38 pm by creativen » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24298
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 45982
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
/*
 * 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.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 45982
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: