@ToSa i tried compiling your code but it fails on the RPi with allot of errors :
pi@raspberrypi ~/Raspberry $ make
make -C librf24
make[1]: Entering directory /home/pi/Raspberry/librf24' g++ -Wall -fPIC -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -c RF24.cpp RF24.h: In constructor ‘RF24::RF24(std::string, uint32_t, uint8_t)’: RF24.h:65:12: warning: ‘RF24::spispeed’ will be initialized after [-Wreorder] RF24.h:53:11: warning: ‘uint8_t RF24::ce_pin’ [-Wreorder] RF24.cpp:258:1: warning: when initialized here [-Wreorder] g++ -shared -Wl,-soname,librf24.so.1 -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -o librf24.so.1 compatibility.o gpio.o spi.o RF24.o make[1]: Leaving directory
/home/pi/Raspberry/librf24'
g++ -c -g -o Gateway.o Gateway.cpp -Wall -Ofast -mfpu=vfp -DDEBUG -DRPI -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -I/home/pi/RF24/RPi/RF24/
In file included from Sensor.h:15:0,
from Relay.h:15,
from Gateway.h:15,
from Gateway.cpp:12:
Config.h:15:0: warning: "DEBUG" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from Relay.h:15:0,
from Gateway.h:15,
from Gateway.cpp:12:
Sensor.h:154:16: error: expected ‘)’ before ‘_spidevice’
In file included from Gateway.h:15:0,
from Gateway.cpp:12:
Relay.h:43:16: error: expected ‘)’ before ‘_spidevice’
In file included from Gateway.cpp:12:0:
Gateway.h:47:18: error: expected ‘)’ before ‘_spidevice’
Gateway.cpp:34:1: error: prototype for ‘Gateway::Gateway(std::string, uint32_t, uint8_t, uint8_t)’ does not match any in class ‘Gateway’
Gateway.h:24:7: error: candidates are: Gateway::Gateway(const Gateway&)
Gateway.h:24:7: error: Gateway::Gateway()
Gateway.cpp: In member function ‘void Gateway::begin(rf24_pa_dbm_e, uint8_t, rf24_datarate_e, void ()(char))’:
Gateway.cpp:62:18: error: ‘OUTPUT’ was not declared in this scope
Gateway.cpp:62:24: error: ‘pinMode’ was not declared in this scope
Gateway.cpp:65:26: error: ‘digitalWrite’ was not declared in this scope
Gateway.cpp:70:25: error: ‘INPUT’ was not declared in this scope
Gateway.cpp:86:53: error: ‘PSTR’ was not declared in this scope
Gateway.cpp: In member function ‘void Gateway::checkButtonTriggeredInclusion()’:
Gateway.cpp:104:59: error: ‘PSTR’ was not declared in this scope
Gateway.cpp: In member function ‘void Gateway::parseAndSend(char*)’:
Gateway.cpp:161:35: error: ‘PSTR’ was not declared in this scope
Gateway.cpp: In member function ‘void Gateway::setInclusionMode(boolean)’:
Gateway.cpp:181:33: error: ‘PSTR’ was not declared in this scope
Gateway.cpp: In member function ‘void Gateway::serial(message_s)’:
Gateway.cpp:236:33: error: ‘PSTR’ was not declared in this scope
Gateway.cpp: In member function ‘void Gateway::ledTimersInterrupt()’:
Gateway.cpp:243:28: error: ‘digitalWrite’ was not declared in this scope
Gateway.cpp:246:30: error: ‘digitalWrite’ was not declared in this scope
Gateway.cpp:252:28: error: ‘digitalWrite’ was not declared in this scope
Gateway.cpp:255:30: error: ‘digitalWrite’ was not declared in this scope
Gateway.cpp:262:28: error: ‘digitalWrite’ was not declared in this scope
Gateway.cpp:265:30: error: ‘digitalWrite’ was not declared in this scope
make: *** [Gateway.o] Error 1