Arduino RF 2.4 GHz Protocol

OzRF24Transceiver is capable to send or receive text messages through a 2.4 GHz antenna. An NRF24L01 transceiver IC is recommended for controlling the antenna.

How to build a test circuit with an NRF24L01 transceiver IC and an Arduino Mega?
Arduino codes are included.

I. 'Welcome' event from microcontroller

Example

// The NRF24L01 IC can either be a sender or receiver:

// sender device sends welcome message if created in main code (.ino)
c=welcome&id=tsCbNw&type=OzRF24Transceiver&pos=1&name=MyRF24Sender&t=2
// receiver device sends welcome message if created in main code (.ino)
c=welcome&id=tsCbNw&type=OzRF24Transceiver&pos=2&name=MyRF24Receiver&t=3

Parameters

Parameter Type Range Functionality
c String 'welcome' Identifies the welcome message.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
type String 'OzRF24Transceiver' Determines the type of the device.
pos Byte 0-255 Determines the position of the device on the list of the ID manager of the microcontroller. Please make sure there are no other devices in the same position.
name (optional) String e.g. 'MyRF24Sender' You can give default names for devices.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.



II. Commands to microcontroller

'send' command

(Only if you use it as a transmitter. It is not used in other cases.)

This command sends any text through the 2.4 GHz antenna.

Example

c=send&text=Hellow world!&id=tsCbNw&t=0

Parameters

Parameter Type Range Functionality
c String 'send' Identifies the command.
text String Any string The text that needs to be transmitted.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
t Byte 0-255 Counts the number of commands sent. Counts from 0 to 255 then from 0 again.

Response to 'send'

(Only if you use it as a transmitter. It is not used in other cases.)

After the radiosignal has been transmitted by the microcontroller it will send this response to your computer.

Example

c=send_resp&text=Hello world!&id=tsCbNw&t=4
Parameter Type Range Functionality
c String 'send_resp' Identifies the response
text String Any string The text that was transmitted by the 2.4 GHz antenna. In case you use a receiver, this parameter is left empty.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.



III. Event from microcontroller

'received' event

(Only if you use it as a receiver. It is not used in other cases.)

This event is called every time a text message is received.

Example

c=received&text=Hello world!&id=tsCbNw&t=5

Parameters

Parameter Type Range Functionality
c String 'received' Identifies the event.
text String Any string The text received by the RF 2,4 GHz receiver.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.

More information