Pages

Wednesday, March 6, 2013

Migrated RF24 codes to github

I've migrated my previous static codes to github's RF24 libs at https://github.com/stanleyseow/RF24
This is a fork from gnulnulf codes that uses dynamic rf24 RPi libraries...

This will be using the Arduino maniacbug's RF24 libraries in additional to the Raspberry Pi codes under a different folder...

Changes to take note from my initial instructions  :-

- CE is now using GPIO25
- CSN is now using GPIO8 (CE0)

Thanks to gnulnulf, you can specify the devices inside of the codes as below :-


RF24 radio("/dev/spidev0.0",8000000 , 25);

The files are located at RF24/librf24-rpi

Instructions on using github version for RPi :-

Using git, issue the following instructions :-

git clone https://github.com/gnulnulf/RF24.git
$ cd RF24
$ cd librf24-rpi/librf24
$ make                                <--- Compile the files
$ sudo make install             <--- This will install the librf24.so.1.0 into the shared libraries
$ sudo ldconfig -v | grep librf

     librf24.so.1 -> librf24.so.1.0

$ cd examples
$ make

To run the programs, type sudo ./rpi-hub or sudo ./scanner

*** You need sudo to access the spidev0.0 device
Instruction on Arduino :-

Got examples/RF24/rpi_hub_arduino

Compile and upload to the Arduino

Connect a small buzzer to digital Pin2

If everything is working, you should hear a short beep ...


Summary Links :-

https://github.com/stanleyseow/RF24 ( Arduino RF24 and RaspberryPi libs codes all in one )












2 comments:

  1. Stanley
    Nice job :-)

    When I follow this tuto, the
    git clone https://github.com/gnulnulf/RF24.git
    does not provide the rpi-hub file
    but with
    git clone https://github.com/stanleyseow/RF24.git
    instead seems, good.
    Could you confirm the repo to use please ?
    Thanks

    ReplyDelete
  2. Yes, I hv done a Pull Requests (merge the codes).. until gnulnulf accept my merge, the example of rpi-hub will only be available from my git repo...

    ReplyDelete