<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Xbee</id>
	<title>Xbee - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Xbee"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Xbee&amp;action=history"/>
	<updated>2026-06-04T19:37:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=Xbee&amp;diff=25386&amp;oldid=prev</id>
		<title>Chao at 20:15, 5 February 2020</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Xbee&amp;diff=25386&amp;oldid=prev"/>
		<updated>2020-02-05T20:15:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Set Xbee and Point to Point Network ==&lt;br /&gt;
* Connect your Xbee via arduino&lt;br /&gt;
* In the PC setting tab, set the baud rate at 9600, 8N1 for arduino serial port, click test/query&lt;br /&gt;
[[File:Arduino xbee manual settings.png|400px]]&lt;br /&gt;
* If the xbee can correctly read, you will see:&lt;br /&gt;
[[File:Arduino xbee manual test.png|400px]]&lt;br /&gt;
* turn to tabe &amp;quot;Modem Configuration&amp;quot; and click &amp;quot;read&amp;quot;, in &amp;quot;Networking &amp;amp; Security&amp;quot; section, set channel to C and Pan ID to 1234&lt;br /&gt;
[[File:Arduino xbee manual configuration.png|400px]]&lt;br /&gt;
* repeat the process for another Xbee, then the point to point network is built&lt;br /&gt;
=== Test ===&lt;br /&gt;
* Turn to Terminal tab, any words typed will display on other xbee terminal&lt;br /&gt;
[[File:Arduino xbee manual transmit.png|400px]]&lt;br /&gt;
=== Arduino Demo Testing code===&lt;br /&gt;
Using two xbee on arduino together, change the B to A, and A to B in the following code, vice verse to another one. Then in one arduino you will receive AAA... and another you will receive BBB..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Arduino&amp;quot;&amp;gt; &lt;br /&gt;
int ledPin = 13;&lt;br /&gt;
int val;&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  pinMode(ledPin, OUTPUT);&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  // send data to another XBee module&lt;br /&gt;
  Serial.print('B');&lt;br /&gt;
  delay(1000);&lt;br /&gt;
&lt;br /&gt;
  // receive data from another XBee module&lt;br /&gt;
  val = Serial.read();&lt;br /&gt;
  if (-1 != val) {&lt;br /&gt;
    if ('A' == val) {&lt;br /&gt;
      digitalWrite(ledPin, HIGH);&lt;br /&gt;
      delay(500);&lt;br /&gt;
      digitalWrite(ledPin, LOW);&lt;br /&gt;
      delay(500);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSSI ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Arduino&amp;quot;&amp;gt; &lt;br /&gt;
* Demo video can be found on this page: https://www.youtube.com/watch?v=1Bz95LL5tZ4&lt;br /&gt;
/*&lt;br /&gt;
 XbeeRSSI.pde&lt;br /&gt;
&lt;br /&gt;
 This is a sketch for RSSI-Measurements. The sketch reads the incoming RSSI Value and turns on a LED if the Signal is strong enough. &lt;br /&gt;
 Please note that the used Value (40) depends on your project environement.&lt;br /&gt;
&lt;br /&gt;
 ATTENTION!!!&lt;br /&gt;
 ---------------------------------------------&lt;br /&gt;
 YOU HAVE TO USE AN ARDUINO WITH AT LEAST TWO SERIAL PORTS!&lt;br /&gt;
 I am using an Arduino MEGA!&lt;br /&gt;
 Connect your Xbee RX to Arduino RX!&lt;br /&gt;
 Connect your Xbee TX to Arduino TX!&lt;br /&gt;
 And don't forget the power supply!&lt;br /&gt;
 RSSI Pin on Xbee -&amp;gt; 6&lt;br /&gt;
 ---------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Author: Cédric Portmann (cedric.portmann@gmail.com.)&lt;br /&gt;
 Copyright (C) 2013 Cédric Portmann&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
int digitalPin = 10;  // the RSSI pin 6 of Xbee is connected to this PWM Pin. (Digital Pin 10)&lt;br /&gt;
int rssiDur;  // Variable for RSSI&lt;br /&gt;
int led = 13;  // LED connected to Pin 13&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  pinMode(digitalPin, INPUT);&lt;br /&gt;
 &lt;br /&gt;
  Serial.begin(9600);   // this is the connection for your Arduino to your PC/MAC&lt;br /&gt;
  Serial3.begin(9600);   // this is the connection of your Xbee to your Arduino MEGA!!&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
  if(Serial3.available() &amp;gt;= 21) {    // This isn't important. You can do here whatever you want.&lt;br /&gt;
            &lt;br /&gt;
    if(Serial3.read() == 0x7E) {  // Reads the start byte&lt;br /&gt;
      for(int i = 1; i &amp;lt; 19; i++) {&lt;br /&gt;
        byte discardByte = Serial3.read();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        rssiDur = pulseIn(digitalPin, LOW, 200); // get's the RSSI Value&lt;br /&gt;
        Serial.println(rssiDur);  //for debbuging and first setup.&lt;br /&gt;
      &lt;br /&gt;
      if(rssiDur &amp;lt; 40 &amp;amp;&amp;amp; rssiDur != 0){  //turns Led on if RSSI is less then 40&lt;br /&gt;
       digitalWrite(led, HIGH); &lt;br /&gt;
      }&lt;br /&gt;
      if(rssiDur &amp;gt; 40 &amp;amp;&amp;amp; rssiDur != 0){ //turns Led off if RSSI is bigger then 40&lt;br /&gt;
       digitalWrite(led, LOW); &lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 [[category: Wireless]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>