Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: unable to stabilized RSSI value on: January 28, 2013, 10:43:30 am
so does that mean i cant get rid of the "abnormal reading"? smiley-eek-blue  because i need to place some stuff for example buzzer on HIGH at a certain range of RSSI then buzzer on LOW at another range of RSSI
2  Using Arduino / Programming Questions / unable to stabilized RSSI value on: January 28, 2013, 09:28:54 am
hi, i am using Xbee series 1 module, and i connect Pin 6(PWM0) of Xbee to 2 digital input pins of ARduino Pro Mini and wrote this code and upload to it
rssi1= pulseIn(rssiPin, HIGH,200);  //Read a HIGH pulse on a pin
  Serial.print("RSSI 1 value is ");
  rssi2 = pulseIn(rssiPin1, LOW, 200); //Read a LOW pulse on a pin1
  Serial.print("RSSI 2 value is ");
it gives me the RSSI value based on PWM signal. when one xbee move away from each other the Rssi 1 decrease while Rssi 2 increase. however there are some values at Rssi 1 that suddenly shoots up to very high value and Rssi 2 drops quite low even when both xbee are far apart like 5 to 7 metre. how can i remove these abnormal readings? should i use For loop to average out the values? plz advice thx!
3  Using Arduino / Programming Questions / Re: simple serial communication using pro mini and xbee s1 on: January 03, 2013, 08:10:19 am
@ nick gammon



then is there any sample/simple program code i can use for wireless push button with an led for pro mini? smiley-cry
4  Using Arduino / Programming Questions / simple serial communication using pro mini and xbee s1 on: January 02, 2013, 10:34:43 pm
hi, i am using 2 arduino pro mini 3.3v, 8mhz and 2 xbee series 1. now i am able to transmit something but not the things i want. the receiver cant read the transmitting side. for example, the receiver keep read the else part "both led are on" rather than the IF part. it is reading only X but not H and L. the baud rate for both xbee is 19200 which is same as the pro mini. i do not know whats wrong with it smiley-cry

transmitter side
void setup() {
void loop() {

receiver side
int LEDredPin =10;
int LEDgreenPin = 11;

void setup() {
pinMode(LEDredPin, OUTPUT);
pinMode(LEDgreenPin, OUTPUT);
void loop() {
while(Serial.available() == 0);
char dataByte =;
if(dataByte == 'H'){
digitalWrite(LEDredPin, HIGH);
digitalWrite(LEDgreenPin, LOW);
Serial.println("Red LED on");
else if(dataByte == 'L') {
digitalWrite(LEDgreenPin, HIGH);
digitalWrite(LEDredPin, LOW);
Serial.println("Green LED on");
digitalWrite(LEDredPin, HIGH);
digitalWrite(LEDgreenPin, HIGH);
Serial.println("Both LED on");
5  Using Arduino / Project Guidance / Re: wireless alarm laptop on: December 17, 2012, 03:58:56 am
hi ybl84f1, thanks for the comment. i have tried using both xbee on API mode.( 1 end device, the other coordinator) and also i enable both API 2 mode. but still is not communicating in the terminal tab smiley-cry. the configuration is at the attachment, i am not sure what have i done wrong. smiley-cry i am using xctu to do these settings btw.
6  Using Arduino / Project Guidance / Re: wireless alarm laptop on: December 12, 2012, 08:34:08 am
oh! sorry! i forgot to mention that the pin 6 of xbee(transmitter side) is connected to pin 9. so sorry about it! smiley-cry
7  Using Arduino / Project Guidance / Re: wireless alarm laptop on: December 11, 2012, 09:21:12 pm
hi PaulS,
So, you are trying to use THE serial port to talk to the PC AND to the XBee. You don't think that will confuse the XBee?

yea, i need to talk to the xbee and PC to show the results (RSSI value) first then afterthat i proceed on with measuring the PWM signal which then the PC is not required anymore.

How is the XBee connected to the Arduino?

the coordinator(sender) is connect with arduino uno
Din > TX
Dout > RX
3.3V > 3.3V

the end device(receiver) is connect to the buzzer
D1 > buzzer
GND and 3.3V is connected to the another arduino to provide power supply.
8  Using Arduino / Project Guidance / wireless alarm laptop on: December 11, 2012, 09:03:14 pm
hi, i am using xbee series 2 and my project objective is using 1 arduino uno board to communicate with 1st xbee and then to  the 2nd xbee. and this 2nd xbee is to control a buzzer. the buzzer will trigger based on the RSSI value. because i am using in API mode which 1 xbee is end device(receiver) in AT mode and another xbee is coordinator(sender) in API mode, i have problems that unable to allow both xbees to communicate and the RSSI value is not shown on the serial monitor. the xbees are configured properly and i am not confident in my code as well. much help will be appreciated! here is my code : 

const int ledpin = 13; // ledpin location
int inByte;   // val
const int rssiPin = 9; // rssipin 1 location
const int rssiPin1 = 10; // rsssipin 2 location

unsigned long rssi1;
unsigned long rssi2;

void setup() {
  pinMode(ledpin, OUTPUT)l; // declare ledpin
  pinMode(rssiPin,INPUT);  // declare rssiPin

void loop () {
  rssi1= pulseIn(rssiPin, HIGH,200);  //Reads a pulse(HIGH) on a pin
  Serial.print("RSSI 1 value is ");
  Serial.print(rssi1);  // display at serial monitor
   Serial.print ('\t');
  Serial.println('H');  // sends a 'H' to on the ledpin at D1 of xbee(receiver)
  rssi2 = pulseIn(rssiPin1, LOW, 200); //Reads a pulse(LOW) on a pin
    Serial.print("RSSI 1 value is ");
  Serial.print ('\t');
  Serial.println('L');  // sends a 'L' to on the ledpin at D1 of xbee
  if (Serial.available() > 0) { // if we have received at least one frome worth of bytes
    inByte =; // read in a byte
  if (inByte == 'H') {
    digitalWrite(ledpin, HIGH);
    remotestate(0x05);      // turn on led
  else if (inByte == 'L') {
  digitalWrite(ledpin, LOW);
  remotestate(0x04);            // turn off led
 // API frame protocol   
void remotestate(int value) { // pass either a 0x4 or and 0x5 to turn the pin on or off
  Serial.write((byte)0x7E); // start byte
  Serial.write((byte)0x0); // high part of length (always zero)
  Serial.write((byte)0x10); // low part of length (the number of bytes that follow, not including checksum)
  Serial.write((byte)0x17); // 0x17 is a remote AT command
  Serial.write((byte)0x0); // frame id set to zero for no reply
  // ID of recipient, or use 0xFFFF for broadcast
  Serial.write((byte)0x13);  //destination HIGH address
  Serial.write((byte)0xA2);  //destination HIGH address
  Serial.write((byte)00);  //destination HIGH address
  Serial.write((byte)0x40);  //destination LOW address
  Serial.write((byte)0x91);  //destination LOW address
  Serial.write((byte)0xA2);  //destination LOW address
  Serial.write((byte)0x89);  //destination LOW address
  // 16 bit of recipient or 0xFFFE if unknown
  Serial.write((byte)0xFB);  //16-bit address
  Serial.write((byte)0x28);  //16-bit
  Serial.write((byte)0x02); // 0x02 to apply changes immediately on remote
  // command name in ASCII characters
  Serial.write((byte)'D');  //set Pin number D1 'D' = 0x44
  Serial.write((byte)'0');  //'0' = 0x30
  // command data in as many bytes as needed
  // checksum is all bytes after length bytes
  long sum = 0x17 + 0x13 + 0xA2 + 0x40 + 0x91 + 0xA2 + 0x89 + 0xFB + 0x28 + 0x02 + 'D' + '0' + value;
  Serial.write((byte)( 0xFF - ( sum & 0xFF)) ); // calculate the proper checksum
  //delay(10); // safety pause to avoid overwhelming the serial port (if this function is not implemented properly)
9  Using Arduino / Programming Questions / Re: arduino > xbee > xbee > components on: November 29, 2012, 10:58:13 pm
thanks cybernetician for the references  smiley hmm but the website normally state that it can only be use 1 microcontroller if use API mode. however, i am using Xbee series 1. i dont think series 1 is able to do it right?

thanks paulS, i am still not sure how to have proper configuration. for example, what kind of settings do i still need to set? bec i am using series 1 not series 2.
10  Using Arduino / Programming Questions / arduino > xbee > xbee > components on: November 23, 2012, 02:01:21 am
hi, anyone know how does it work when using 1 arduino uno board and 2 xbee series 1? in other words, transmitter is connected to the board while the receiver is connected to the components such as LEDs, buzzer etc. thus it will send data to receiver and activate buzzer or LED. i heard using software serial is possible. is it true?
11  Using Arduino / Programming Questions / RSSI value of xbee series 2 pin on: November 12, 2012, 03:40:02 am
hi, does anyone know how to read the RSSI value of the xbee and how does it read the RSSI using arduino? i am doing a project that need to use 2 xbee and 2 arduino uno board where the arduino is able to read and detect the signal strength between both xbee modules. is there any website that i can use as reference? thanks! sorry i am noob here  smiley-cry
Pages: [1]