RFM69 library for Raspberry PI

Hi guys!

I'm connecting all my domotic nodes with HopeRF RFM69 modules, and I want my central node to be a Raspi to launch a server and log all events from all nodes.

I searched on the web and I didn't find any library to run these modules directly from the SPI on the Raspberry so I decided to port the LowPowerLab RFM69 library to work on the Raspi. 

I changed some functions and I didn't ported any others, because my application doesn't need it. Main changes are that I removed all interruption capabilities. I know that it is better with them, but in my application I have not the interruption pins available on atmega microcontroller, so I added a 2 seconds timeout on receiveing function. Another function it's not available (and I want to port) is the ACK confirmation. I will post it when have any free time.

To run with Raspi hardware SPI, I use WiringPi library, some lines down I explain how to install it to get the library running.


Let's go with the interesting text:

Here is the RFM69 library source code


To get this library running, follow these steps:

1.- Install WiringPi library

  • Install git with

sudo apt-get install git-core  
  • Downlaod the WiringPi last version. If fails, I'm uploading the current version, working with the code.

git clone git://git.drogon.net/wiringPi  
  • Gordon prepared it with an script to build, so you will simply will need to install it with

cd wiringPi 

  • Load the SPI module

gpio load spi 

2.- Download my library source and extract the data

wget http://rdepablos.merlitec.com/sites/default/files/rfm69lib.tar.gz
tar -zxvf rfm69lib.tar.gz
cd rfm69lib

3.- Compile test code and get it running!

gcc test_rfm69.c rfm69.c -o test_rfm69 -lwiringPi


Hardware configuration is simple:

Playing with $7 2.4'' inch TFT with touchscreen shield for Arduino

Hi guys!

These days I am playing with a new toy for Arduino I founded on eBay. It is a 2.4'' inches TFT with touchscreen with a resolution of 320 x 240 for less than $7 you can find in this link.

Firstly it was a little hard to make it run, because image was x-mirrored using the libraries I founded on Canton-Electronics (check Document Download at right of the webpage) so I needed to search for more. Finally I succeded using the Adafruit libraries you can find them here.

This discovery it's an important milestone for my domotic project (I didn't write before but indeed I will) to make nodes to control temperature, blinds or lights. First I need is to create a menu to access to these different utilities. Following video will show you my advances.



Next work will be to connect it through bluetooth or any other radio interface to the central computer (raspberry, cubie or similar) to centralize the information and control it from mobile phone or tablet and add a temperature sensor to be able to monitorize the room temperature.

Finally I will design a case for it, ready to be printed on my 3D printer. Are you ready for it?? Just follow my website next days!

You can  download the code from here.


Syndicate content