Project

General

Profile

Resolved: error compiling rf12serial example

Added by toddm over 4 years ago

Hi all,

My first post here. I’m having problems compiling the RF12Serial example from here: https://github.com/jcw/jeelib I downloaded the zip file then manually installed it to: Documents/Arduino/Libraries/Jeelib/.

Arduino 1.05-r2 does not recognize the zip file as a library if I try to install it automatically. By the way I’m running on WIN 8.1 and ATMEGA328P on a breadboard if that makes any difference.

Whats strange to me is that the RF12Demo will compile just fine. Typically when I get this many “scope” errors its a library structure issue. This one seems to be correct as far as my limited experience tells me.

Here are the errors I get:
C:12\RF12.cpp: In function ‘void spi_initialize()’:
C:12\RF12.cpp:113: error: ‘bitSet’ was not declared in this scope
C:12\RF12.cpp:115: error: ‘digitalWrite’ was not declared in this scope
C:12\RF12.cpp:116: error: ‘OUTPUT’ was not declared in this scope
C:12\RF12.cpp:116: error: ‘pinMode’ was not declared in this scope
C:12\RF12.cpp:118: error: ‘INPUT’ was not declared in this scope
C:12\RF12.cpp: In function ‘uint16_t rf12_xfer(uint16_t)’:
C:12\RF12.cpp:168: error: ‘bitClear’ was not declared in this scope
C:12\RF12.cpp:171: error: ‘bitSet’ was not declared in this scope
C:12\RF12.cpp: In function ‘uint16_t rf12_control(uint16_t)’:
C:12\RF12.cpp:178: error: ‘bitClear’ was not declared in this scope
C:12\RF12.cpp:180: error: ‘bitSet’ was not declared in this scope
C:12\RF12.cpp: In function ‘void rf12_sendStart(uint8_t, const void*, uint8_t)’:
C:12\RF12.cpp:288: error: ‘memcpy’ was not declared in this scope
C:12\RF12.cpp: In function ‘void rf12_initialize(uint8_t, uint8_t, uint8_t)’:
C:12\RF12.cpp:325: error: ‘INPUT’ was not declared in this scope
C:12\RF12.cpp:325: error: ‘pinMode’ was not declared in this scope
C:12\RF12.cpp:326: error: ‘digitalWrite’ was not declared in this scope
C:12\RF12.cpp:334: error: ‘digitalRead’ was not declared in this scope
C:12\RF12.cpp:358: error: ‘LOW’ was not declared in this scope
C:12\RF12.cpp:358: error: ‘attachInterrupt’ was not declared in this scope
C:12\RF12.cpp:360: error: ‘detachInterrupt’ was not declared in this scope
C:12\RF12.cpp: In function ‘uint8_t rf12_config(uint8_t)’:
C:12\RF12.cpp:384: error: ‘Serial’ was not declared in this scope
C:12\RF12.cpp:387: error: ‘Serial’ was not declared in this scope
C:12\RF12.cpp: In function ‘char rf12_easyPoll()’:
C:12\RF12.cpp:415: error: ‘byte’ was not declared in this scope
C:12\RF12.cpp:415: error: expected `;‘ before ’myAddr’
C:12\RF12.cpp:416: error: ‘myAddr’ was not declared in this scope
C:12\RF12.cpp:426: error: ‘byte’ was not declared in this scope
C:12\RF12.cpp:426: error: expected `;‘ before ’newData’
C:12\RF12.cpp:427: error: ‘millis’ was not declared in this scope
C:12\RF12.cpp:428: error: ‘newData’ was not declared in this scope
C:12\RF12.cpp: In function ‘char rf12_easySend(const void*, uint8_t)’:
C:12\RF12.cpp:449: error: ‘memcmp’ was not declared in this scope
C:12\RF12.cpp:451: error: ‘memcpy’ was not declared in this scope


Replies (6)

RE: error compiling rf12serial example - Added by JohnO over 4 years ago

toddm wrote:
> My first post here. I’m having problems compiling the RF12Serial example from here: https://github.com/jcw/jeelib I downloaded the zip file then manually installed it to: Documents/Arduino/Libraries/Jeelib/.

Do you unzip (extract) the contents of the https://github.com/jcw/jeelib zip file into Documents/Arduino/Libraries/Jeelib/

RE: error compiling rf12serial example - Added by toddm over 4 years ago

I think I did. I actually can’t remember. I do remember that Arduino didn’t like the dash in the name of the folder and I had to rename it. It could be that I extracted it to a different folder then copied the extracted folders into the Libraries folder. What is the proper procedure?

RE: error compiling rf12serial example - Added by JohnO over 4 years ago

Method doesn’t particularly matter so long as you get the contents of Documents/Arduino/Libraries/Jeelib/ to contain filenames like this:

Doxyfile      LICENSE          PortsBMP085.h  PortsSHT11.cpp  intro.md
Doxylogo.png  Ports.cpp        PortsLCD.cpp   PortsSHT11.h    intro_rf12.md
Doxymods.css  Ports.h          PortsLCD.h     RF69_avr.h      keywords.txt
JeeLib.h      PortsBMP085.cpp  PortsRF12.cpp  examples

More files than this but you get the idea.

RE: error compiling rf12serial example - Added by JohnO over 4 years ago

toddm wrote:
> C:12\RF12.cpp:113: error: ‘bitSet’ was not declared in this scope

Is jeelib missing from the path above?

C:12\RF12.cpp

RE: error compiling rf12serial example - Added by toddm over 4 years ago

That’s what I had. I deleted the previous jeelib library then retried by extracting the zip file to the Libraries folder. I then renamed the folder that was created from jeelib-master to just jeelibmaster. Now the serial example and the demo example are compiling correctly. The folder structure still looks the same but it is now working.

Oh! I forget to mention that I had an older version of the RF12 library installed also. I deleted it too when I redid the jeelib folder. Could it have been interfering?

Thanks,

Todd

RE: error compiling rf12serial example - Added by toddm over 4 years ago

JohnO wrote:
> toddm wrote:
> > C:12\RF12.cpp:113: error: ‘bitSet’ was not declared in this scope
>
> Is jeelib missing from the path above?
>
> C:12\RF12.cpp

Aw crap! You are right! I was wondering why the RF12.cpp was showing to be in the RF12 folder when I didn’t have an RF12 folder in Jeelib. I never even noticed that jeelib was missing from the path. This confirms that the older library I had installed was being used and not the jeelib library as It was named RF12… At least the Problem is solved.

Thanks for your help JohnO !!

    (1-6/6)