XBee Radio Transducer

XBee radio transducers are RF transceiver modules operating at 2.4GHz which allow PICAXE and other devices to communicate with each other.

XBee is a registered trademarks of Digi International Inc.

Related Commands:

Print Page




Transmit via XBee

This program runs on an 18M2 fitted to an AXE210 board as an XBee transmitter. It sends and incrementing value out via XBee every second. The output can be viewed by an AXE210 receiving board connected to a terminal display.

Code Example:
init:	high B.7
	pause 100
main:	serout B.7, T2400, (“Value =”, #b1,CR,LF)
	let b1 = b1 + 1
	pause 1000
	goto main
Copy Code Submit an Example

Transmit from one PICAXE to another

This program reads an analogue input on pin C.0 and a temperature sensor connected to pin C.1 and passes them to an XBee for transmission.

Code Example:
init:	high B.7
	pause 100
main:	readadc C.0,b0
	readtemp C.1,b1
	serout B.7, T2400, ($55,$55,b0, b1)
	pause 1000
	goto main
Copy Code Submit an Example

Receive transmitted data

This program receives data transmitted by a PICAXE via XBee (Example 2) and controls LEDs on output pin B.0 and B.1 depending on the received light level and temperature determined by the transmitter.

Code Example:
main:		serin C.7, T2400, ($55,$55),b0, b1
test_LDR:	if b0 > 40 then LDR_high
LDR_low:	low B.0
		goto test_temp
LDR_high:	high B.0
test_temp:	if b1 > 20 then temp_high
		temp_low low B.1
		goto main
temp_high:	high B.1
		goto main
Copy Code Submit an Example

Create Module

An XBee based radio module may be connected to the generic terminal block create module. Take care to step down to the 3.3V XBee system voltage (i.e. use a 3V battery pack, not a 4.5V battery pack, on the motherboard).

Bill of Materials

XBee radio module XBE001 1 Buy Now
10-way 2mm header socket CON046 2 Buy Now


No Image Selected

Submit Your Own Code!

You must be logged in to submit code examples. Login now.