A c++ library for the arduino to talk to the HopeRF RFM22 wireless radio
C++ C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README
RFM22.cpp
RFM22.h
keywords.txt

README

I purchased several RFM22 modules (http://www.hoperf.com/rf_fsk/rfm22.htm) from sparkfun, with the intention of attaching it to my Arduino, and building inexpensive devices able to speak to each other over the air. This turned out to be somewhat more difficult than I had imagined, but once I solved the basic hardware issues, I put this library together to make it easier to interact with the radio from code.

THe library does some basic SPI setup to talk to the device, and provides some low level commands to get and set the values of various registers on the device. Assuming the Arduino has one of its interrupt lines connected to the device, setting and clearing interrupts that can be set is also exposed from a few simple methods. Additionally, there is an init command which goes through and sets the various values required for basic wireless operation for the 434MHz models.

This project serves as a way to learn hardware development in addition to C++ and the various details of wireless communication, so there are likely many easy improvements which can be made. For example, instead of
radio.write(0x10,0b10011000);
it would be nice if I could get to the point where one could say something to the effect of
radio[0x10] = 0b10011000;
I know this to be possible, but it is yet out of my reach. I soon also hope to provide methods that can be called for burst reads/writes for use in the FIFO buffers, as well as possibly simple messaging protocols that make use of these low level commands.