Go Down

Topic: Problems using library for RFM12B wireless module (Read 1 time) previous topic - next topic

jamesfbrown

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.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy