UNO + motomamma with xbee Wireless can't make it work...

Hello there?

first of all, i'm a new to arduino and xbee, and i want (to try) to control a small robot by wirelles with an html page in my browser.

I put an xbee (Xbee Wifi - XB2B-WFST-001 - RPSMA Antenna)

xbee

into a motomama (L298N an H-bridge with a xbee socket)

http://www.southtrader.co.za/shop/motomama-l298n-h-bridge-motor-driver-shield/

and then i wired to a UNO...

and uploaded this sketch:

sketch
https://dl.dropboxusercontent.com/u/35995718/MotoMamaTest.zip

I try also this example too:

example but the same thing

http://www.southtrader.co.za/start/wp-content/uploads/2012/03/MotoMamaTest.rar

inside has a ".pde" file witch i rename it to ".ino".

#include <IRremote.h>
#include <IRremoteInt.h>
#include <IRremoteTools.h>



int RECEIVE_PIN = 2;
IRrecv irrecv(RECEIVE_PIN);
decode_results results;



void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiv1er
  pinMode(11, OUTPUT);   // sets the pin as output
  pinMode(12, OUTPUT);   // sets the pin as output
  pinMode(13, OUTPUT);   // sets the pin as output
  pinMode(8, OUTPUT);   // sets the pin as output
  pinMode(9, OUTPUT);   // sets the pin as output
  pinMode(10, OUTPUT);   // sets the pin as output
}

void loop()
{
     if (irrecv.decode(&results)) {
        Serial.print("0x");
        Serial.println(results.value, HEX);
        delay(50);
        irrecv.resume();// Receive the next value
    }
  int i;
  digitalWrite(12, HIGH);
  digitalWrite(8, HIGH);
  digitalWrite(13, LOW);
  digitalWrite(9, LOW);
  for (i = 0; i < 1024; i++)
  {
    analogWrite(11, i);  // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
    analogWrite(10, i);
    delay(100);
  }
  digitalWrite(13, HIGH);
  digitalWrite(9, HIGH);
  digitalWrite(12, LOW);
  digitalWrite(8, LOW);
  for (i = 0; i < 1024; i++)
  {
    analogWrite(11, i);  // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
    analogWrite(10, i);
    delay(100);
  }
}

i can't compile
give me this error.

////////////ERROR COMPILING////////////////////////////////////////////////////////////////////////////////////

C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
^
Erro ao compilar.

i already import the libraries (right, i think...) somewhere ....("add ZIP") in include library option.

My compiler is Arduino 1.6.3

This is another problem.

(besides, my xbee is brand new, the fisrt time he responds to a default address: 192.168.1.10 or 100, i dont remember now he does nothing, can restore the factory defaults in my xbee ? does it provide a webserver?)

Thank's in advance for helping me, trying to solve my mess... (this is a little confusing for me)

regards

Rui

I think the problem is what the error message says.

DarkAngel1973:
C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to

int RECV_PIN expects an integer, but gets some text the compiler assumes to be an undeclared variable "TKD2". This is a problem with the RobotIRremote library, specifically in the file IRremoteTools.cpp

You could try and get a working copy of the library. Or you could try defining TKD2 to be the number of whatever pin you are connecting the IR receiver to.

As for the problem with the xbee, I'm not shure. I have never used one. Google however returns several hits when I search for "xbee factory reset". See if you can find anything useful that way maybe.

Hope this helps.

There was a problem with the IRremote library conflicting with the Robot IR Remote library. Remove the IRremotetools line. And make sure you include the IRremote lib instead of the Robot IR Remote one.