Hi
I am able to successfully compile my C++ code on Raspberry Pi3 however while running an executable file. I am getting below error.
pi@raspberrypi:~/RF24/librf24-rpi/librf24/examples $ ./Test2
./Test2: symbol lookup error: ./Test2: undefined symbol: _ZN4RF24C1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjh
pi@raspberrypi:~/RF24/librf24-rpi/librf24/examples $
My Scenario :
I am capturing a humidity & temp data from Arduino and passing them as structure through NRF 24 module. My objective is to capture the structure coming out from Arduino into Raspberry Pi3.
BTW, Arduino code is working fine and I am able to receive the structure in another Arduino sensor but not on Raspberry.
Appreciate your help.
Plz see the code below for both Raspberry Pi & Arduino code below.
****************** Raspberry Code*********
#include <cstdlib>
#include <iostream>
#include "../RF24.h"
#include "MyLibrary.h"
//
// Hardware configuration
//
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
RF24 radio("/dev/spidev0.0",8000000 , 25); //spi device, speed and CSN,only CSN is NEEDED in RPI
// sets the role of this unit in hardware. Connect to GND to be the 'pong' receiver
//
// Topology
//
// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xE8E8F0F0E9LL, 0xF0F0F0F0D2LL };
Init_sensors Sensor;
struct HuMotion1{
float value;
float Humidity;
float Temp;
bool Humidifier_Status;
bool Lamp_Status;
int Daytime;
int HuMotion_loc;
};
HuMotion1 HuMotion11;
void setup(void)
{
radio.begin();
// optionally, increase the delay between retries & # of retries
radio.setRetries(15,15);
// optionally, reduce the payload size. seems to
// improve reliability
radio.setDataRate(RF24_250KBPS);
radio.setPayloadSize(sizeof(HuMotion11));
radio.setPALevel(RF24_PA_MAX);
radio.setChannel(0x4c);
radio.setPALevel(RF24_PA_MAX);
//
// Open pipes to other nodes for communication
//
// This simple sketch opens two pipes for these two nodes to communicate
// back and forth.
// Open 'our' pipe for writing
// Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading)
radio.openReadingPipe(1,pipes[0]);
radio.startListening();
//
// Dump the configuration of the rf unit for debugging
//
radio.printDetails();
}
void loop(void)
{
sleep(1);
if ( radio.available() )
{
// Dump the payloads until we've gotten everything
//unsigned long got_time;
bool done = false;
while (!done)
{
// Fetch the payload, and see if this was the last one.
done = radio.read( &HuMotion11, sizeof(unsigned long) );
printf(" Humidity Date From Arduino...",HuMotion11.Humidity);
// Delay just a little bit to let the other unit
// make the transition to receiver
delay(20);
}
radio.stopListening();
}
}
int main(int argc, char** argv)
{
setup();
while(1)
loop();
return 0;
}
*********************** Arduino code*************