nrf24 transceiver

hi, i have a question regarding nrf24. i want to send gps location through one ardunio to otherone using nrf24. but its not working because of "uint8_t data = " “;”. its only allow me to send only string. is that possible i cant send a function like uint8_t data =;

#include <TinyGPS++.h> // Include the TinyGPS++ library
TinyGPSPlus tinyGPS; // Create a TinyGPSPlus object

#include <SoftwareSerial.h>

SoftwareSerial ssGPS(2, 3); // Create a SoftwareSerial

#define SerialMonitor Serial

#include <SPI.h>
#include <RH_NRF24.h>

//const int trigPin = 7;
//const int echoPin = 9;
RH_NRF24 nrf24;

void setup()
while (!Serial)
; // wait for serial port to connect. Needed for Leonardo only
if (!nrf24.init())
Serial.println(“init failed”);
// Defaults after init are 2.402 GHz (channel 2), 2Mbps, 0dBm
if (!nrf24.setChannel(1))
Serial.println(“setChannel failed”);
if (!nrf24.setRF(RH_NRF24::DataRate2Mbps, RH_NRF24::TransmitPower0dBm))
Serial.println(“setRF failed”);
//pinMode(trigPin, OUTPUT);
//pinMode(echoPin, INPUT);

// “Smart delay” looks for GPS data while the Arduino’s not doing anything else

void loop()
// Send a message to nrf24_server
uint8_t data = “gg”;
nrf24.send(data, sizeof(data));

void printGPSInfo()
// Print latitude, longitude, altitude in feet, course, speed, date, time,
// and the number of visible satellites.
SerialMonitor.print("Lat: "); SerialMonitor.println(, 6);
SerialMonitor.print("Long: "); SerialMonitor.println(tinyGPS.location.lng(), 6);
SerialMonitor.print("Speed: "); SerialMonitor.println(tinyGPS.speed.kmph());
SerialMonitor.print("Date: "); printDate();
SerialMonitor.print("Time: "); printTime();

// This custom version of delay() ensures that the tinyGPS object
// is being “fed”. From the TinyGPS++ examples.
static void smartDelay(unsigned long ms)
unsigned long start = millis();
// If data has come in from the GPS module
while (ssGPS.available())
tinyGPS.encode(; // Send it to the encode function
// tinyGPS.encode(char) continues to “load” the tinGPS object with new
// data coming in from the GPS module. As full NMEA strings begin to come in
// the tinyGPS library will be able to start parsing them for pertinent info
} while (millis() - start < ms);

// printDate() formats the date into dd/mm/yy.
void printDate()

// printTime() formats the time into “hh:mm:ss”, and prints leading 0’s
// where they’re called for.
void printTime()
if (tinyGPS.time.minute() < 10) SerialMonitor.print(‘0’);
if (tinyGPS.time.second() < 10) SerialMonitor.print(‘0’);

Have a look at this Simple nRF24L01+ Tutorial

The nRF24 just sends bytes (max 32 bytes per message). You can put any data you like into the bytes that are to be sent.

What format is the data that comes from your call to ?

PS … please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum