Pages: [1]   Go Down
Author Topic: Problems using library for RFM12B wireless module  (Read 765 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
I am trying to use the library published and documented at http://www.hansinator.de/rfm12lib/
I have done as much research with the documentation as I can so this post is the "last resort" for me so I hope someone can help.  I am sure it is a simple problem that I have overlooked.
The issue is that I have preprocessor compilation errors: many, but I will start with the first one.
I am aware that the libraries are documented as being written for the avr-gcc compiler.  In fact I am using the Arduino IDE.  However I do not see why this should be the problem.  At this point I do not particularly want to invest the time in understanding the avr-gcc world.

The first compiler error is
C:\Users\James\Documents\Arduino\libraries\rfm12\/include/rfm12_core.h:196:3: error: #error "Unsupported RFM12 baseband selected."

This is the sketch:
#include <Arduino.h>  (note:  I do not actually understand why I need this, but it did remove many other compiler errors)
#include <rfm12_config.h>
#include <rfm12.h>

void setup ()
{
}

void loop ()
{
}

and here are code fragments from the library files:

From rfm12_config.h:
#define RFM12_BASEBAND RFM12_BAND_433

From rfm12.c
#include "include/rfm12_core.h"

From rfm12_core.h
//baseband selection
#if (RFM12_BASEBAND) == RFM12_BAND_433
   #define RFM12_FREQUENCY_CALC(x) RFM12_FREQUENCY_CALC_433(x)
#elif (RFM12_BASEBAND) == RFM12_BAND_868
   #define RFM12_FREQUENCY_CALC(x) RFM12_FREQUENCY_CALC_868(x)
#elif (RFM12_BASEBAND) == RFM12_BAND_915
   #define RFM12_FREQUENCY_CALC(x) RFM12_FREQUENCY_CALC_915(x)
#else
   #error "Unsupported RFM12 baseband selected."
#endif

Full files attached.

* rfm12_config.h (3.6 KB - downloaded 8 times.)
* rfm12.c (20.63 KB - downloaded 6 times.)
* rfm12.h (8.25 KB - downloaded 10 times.)
* rfm12_core.h (6.72 KB - downloaded 8 times.)
Logged

Pages: [1]   Go Up
Jump to: