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)
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