Hi,
I'm relatively new to all things Arduino/Forum and even newer to XBEE so I'd appreciate any help I can get for my university project... ![]()
Currently I have a Brushless Drone Motor & ESC hard wired and connected to a breadboard with a 4.7k potentiometer to control the speed. I would like to make the potentiometer wireless so I can control the motor from a distance. (Ideally also an on/off switch on the remote but that is less important)
Using this code:
#include <Servo.h> //Using servo library to control ESC
Servo esc; //Creating a servo class with name as esc
void setup()
{
esc.attach(9); //Specify the esc signal pin,Here as D8
esc.writeMicroseconds(1000); //initialize the signal to 1000
Serial.begin(9600);
}
void loop()
{
int val; //Creating a variable val
val= analogRead(A0); //Read input from analog pin a0 and store in val
val= map(val, 0, 1023,1000,2000); //mapping val to minimum and maximum(Change if needed)
esc.writeMicroseconds(val); //using val as the signal to esc
}
I have:
2 x Arduino Uno
2 x XBEE Series 2 (XB24-B?)
2 x SparkFun XBEE Explorer Mini USB Boards
1 x SparkFun XBEE Shield
1 x Brushless Drone Motor & ESC
1 x 11.1v Li-Po Battery
I have managed to programme:
- one XBee to be ZNet 2.5 Coordinator AT an
- one XBee to be ZNet 2.5 Router/End Device AT
using the XCTU software and got them to talk to each other in a chat room style format without the use of Wifi.
Please see attached photos,
Thanks in advance for your help, it means a lot!


