Xbee receiving in packets

Almost all is software

The memory for the number of keystrokes is likely in your software somewhere. Unless you are really talking about a press on a key of the actual keyboard. (Some generations of computer users would deem this an archaic mode of operation.) A keyboard has a chip which will hold some number of keystrokes. This buffer holds on to them until the computer asks for them.

This is why some programmers flush this buffer before they trust the input to be actual. They just ask for X number of inputs (and throw those away) before using the next input. X is the size of the buffer in characters//bytes. About 32 or so.

sorry for any confusion, but

sorry for any confusion, but i meant that there is a button hooked up to my arduino which is sending “hello” over the xbee to my receiving xbee which is plugged into my computer and is printing to the arduino ide serial monitor.

Could be that the loop to

Could be that the loop to send out the data is getting stuck somewhere. Do you have any way to show an indication of data being sent from the xbee and receiving on the other side? If not, just as a thought, you could use a pnp hooked up to an led on the serout pin to see when it gets sent to the xbee. add the same thing to the serin. so when it sends to the second arduino, you’ll know it’s got it. You can trace the delay from there.

 

The adapter does have some

The adapter does have some red light on it for “activity” but i do not think it shows what i need it to http://www.adafruit.com/index.php?main_page=product_info&cPath=29&products_id=126

yeah, power and rssi from

yeah, power and rssi from what it says. I don’t think that the rssi would work for what you need. I still suggest you use the pnp(ex. 2n3906) connected to a the serial pins I mentioned. This will give you a transmit indicator. Hello will be long enough to register a few blinks on the led. It’s simple enough to set up. 1k res to the pnp and a 470-1k res for the LED. It should be simple enough to connect.

Will try this right now.

Will try this right now.

I think it is not sending.

I think it is not sending. Its seems like the receiver is working but may be the transmitter is not sending correctly

It cold be related to the

It cold be related to the logic, or timeout. Check your code and see if it gets stuck in a loop somewhere…or the potential.

Here is the code #include

Here is the code 

 #include <LiquidCrystal.h>

 

 LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int dPin = 8;

int cPin = 6;

int ePin = 7;

int bPin = 10;

int aPin = 13;

 

void setup(){

 

  lcd.begin(16, 2);

  pinMode(dPin, INPUT);

  digitalWrite(dPin, HIGH);

  pinMode(aPin, INPUT);

  digitalWrite(aPin, HIGH);

  pinMode(ePin, INPUT);

  digitalWrite(ePin, HIGH);

  pinMode(bPin, INPUT);

  digitalWrite(bPin, HIGH);

   pinMode(cPin, INPUT);

  digitalWrite(cPin,HIGH);

Serial.begin(9600);

 

 

}

 

void loop(){

    if(digitalRead(cPin) == 0){

    Serial.println(“hello”);

    delay(200);

    }

}

Seeing how this works fine

Seeing how this program works fine using the cable but not using the xbee, it must be the xbee.

Have you tried using Low

Have you tried using Low instead of 0 for if(digitalRead(cPin) == 0)

just did and it did not

just did and it did not change the effect.

I’m not familiar enough with

I’m not familiar enough with the xbee or the tool to config it, but do you know if iti has a buffer read that waits for a certain amount of data? That could something to look at.

 

familiarized myself with a

familiarized myself with a bit of it and found something that could cause the issue you are seeing.

http://www.ladyada.net/make/xbee/arduino.html

1/4 page down it mentioned packetization timeout.

"Next we’ll set the Packetization Timeout. This is what determines how long to wait before sending the characters over. We’re doing some ‘bulk transfer’ when sending 10K programs over, so you’ll probably want this number high like 10"

This could potentually cause an issue and if as you say it looks like an xbee thing then something like this setting would do it.

 

they were set to 3 now set

they were set to 3 now set to 0 but still no change.

mmm…not sure man.

mmm…not sure man.

interesting

Very interesting, so what you’re saying, is that keyboards have a buffer in them and thus remember what you’ve typed? How cool would it be to hack into this buffer :smiley:

remember - a bit

This buffer i very small. A few words at most. And your hack would have to be hardware, I think. Some keyboard sniffers work like that indeed.

I have a forum going on at

I have a forum going on at diydrones.com too http://diydrones.com/forum/topics/xbee-is-delayed-and-sending-in?xg_source=activity with this question.

I had a similar problem and

I had a similar problem and this is what they told me on the arduino forums: "One possible issue i see is you don’t have a delay in there to help ensure the buffer has all the data that was sent. "