A Sunset in Shenzhen

I am in the center of Shenzhen for a couple of weeks searching for new PCBA manufacturers and to see the next bq 4.5'' mobile phone mass production.

I am living a lot of new experiences and opening my mind with the way of living of this city and I want to share with you a photo that represents how much beautiful it is.

This is a little part of the city that allows all the world to have electronic devices as we know nowadays.

See you from Nanshan district in Shenzhen!!

 

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 
./build

  • 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
./test_rfm69

 

Hardware configuration is simple:

Syndicate content