The nrf24 daemon is a service which runs on a raspberry pi used to interface with a nrf24l01+ chip, especially the NRF24 board.
The following connection is necessary:
|CSN||SPI CE 0|
$ cat /opt/nrf24d/interrupts/1500
# <arg1> = event id
# <arg2> = value
# event = event 0 (in this case turn on/off lamps)
if [ "$1" -eq "0" ]; then
# default case turn off lamps
#if second argument is 0 then turn on lamps
if [ "$2" -eq "0" ]; then
# send commands to lamps
/opt/nrf24d/nrf24ctl 1521 "$VAL" &
/opt/nrf24d/nrf24ctl 1522 "$VAL"
The command nrf24ctl can be used to send commands to the lamps via the ipc server.
It has two different command lines:
/opt/nrf24d/nrf24ctl <id> <value>
Sends a command to the board with the specified id to change its PORTB register to the specified value.
This is equivalent to:
/opt/nrf24d/nrf24ctl <id> 4 716 <value>
/opt/nrf24d/nrf24ctl <id> <command> <address> <value>
Sends a command with the specified addres and value to board id.