compile emonTH_DHT22_DS18B20

Hi, I'd like to compile some new firmware for my 4 emonTH. Just to change the name of the node, but I've got some trouble during compilation of emonTH_DHT22_DS18B20.

I've setup my Arduino Libraries like here : http://openenergymonitor.org/emon/buildingblocks/installing-arduino-libr...

All seems ok.

I've got all this libs from git.

ArduinoDHT22
DallasTemperature
DHT_sensor_library
EmonLib
emonTH
emonTxFirmware
ethercard
glcdlib
jeelib
OneWire
RFu_jeelib
rtclib

$ history | grep git   509  git clone https://github.com/openenergymonitor/emonTH.git
  510  git clone https://github.com/openenergymonitor/RFu_jeelib.git
  511  git clone https://github.com/milesburton/Arduino-Temperature-Control-Library
  512  git clone https://github.com/jcw/rtclib
  513  git clone https://github.com/jcw/glcdlib
  514  git clone https://github.com/jcw/ethercard/
  526  git clone https://github.com/openenergymonitor/ArduinoDHT22.git
  530  git clone https://github.com/markruys/arduino-DHT.git
  535  git clone https://github.com/jcw/jeelib.git
  540  git clone https://github.com/adafruit/DHT-sensor-library
  641  git clone https://github.com/openenergymonitor/emonTxFirmware

And OneWire from : http://www.hacktronics.com/code/OneWire.zip

When I tried to compile I obtain this error.

/home/nomad/sketchbook/libraries/RFu_jeelib/RFu_RF12.cpp:361:19: fatal error: RF12.h : No such file or dir
compilation terminated.

But RF12.h is inside jeelib.

nomad@e4310:~/sketchbook/libraries/jeelib$ ls -l RF12.h
-rw-r--r-- 1 nomad nomad 6091 déc.  22 14:02 RF12.h
nomad@e4310:~/sketchbook/libraries/jeelib$

What did I miss ?

Thanks !

Robert Wall's picture

Re: compile emonTH_DHT22_DS18B20

I'm on Windoze, but I think you should have  RFu_JeeLib.h, RFu_RF12.cpp and RFu_RF12.h inside RFu_jeelib

It looks like you've got RFu_jeelib and jeelib mixed up. You must not use the plain jeelib with the RFu module.

nomad's picture

Re: compile emonTH_DHT22_DS18B20

All seems to be there in my RFu_jeelib folder !

Effectively I have booth jeelib and RFu module.

I tried to remove my ~/sketchbook/libraries/jeelib folder but I've got exactly the same trouble.

MartinR's picture

Re: compile emonTH_DHT22_DS18B20

That error is saying that RF12.h is referenced on line 361, character 19 of RFu_RF12.cpp and the compiler can't find the file. If you look at this line it does indeed have "#include <RF12.h>". I've no idea why that's in the middle of the file but it should still compile if RF12.h is present so your problem is that the compiler can't find this file.

Try putting jeelib back into the libraries folder and close all instances of Arduino IDE and then re-open your project and check that jeelib appears in the "import library" menu.

glyn.hudson's picture

Re: compile emonTH_DHT22_DS18B20

See here for a download of my Arduino folder which I used to compile emonTH http://files.openenergymonitor.org/Arduino64-bit.zip.

Please post once your figure out what was causing the problem Maybe we need to updated documentation. 

MartinR's picture

Re: compile emonTH_DHT22_DS18B20

Surely the problem, at least from your point of view Glyn, is that RFu_jeelib won't compile by itself because RFu_RF12.cpp contains a reference to RF12.h and RF12.h isn't part of the library.

It will compile for you because I assume you have the old jeelib in your path and for some reason this isn't being seen in nomad's case.

Personally I don't like the idea of forking off the library like this as it's bound to lead to issues in the future trying to track any bug fixes in both versions of the library. Have you asked JCW if he could add an RFu option to the main library?

nomad's picture

Re: compile emonTH_DHT22_DS18B20

I tried to answer, but can't because of forum spam filter

nomad's picture

Re: compile emonTH_DHT22_DS18B20

Here is what I've done one an other computer running Ubuntu 13.04

nomad's picture

Re: compile emonTH_DHT22_DS18B20

in attachment my terminal of what I've done

nomad's picture

Re: compile emonTH_DHT22_DS18B20

sorry for all these post, and just some trouble with the anti spam filter on the forum.

MartinR's picture

Re: compile emonTH_DHT22_DS18B20

OK, I'll try one more time, it won't compile because you don't have jeelib in your libraries folder, that's the original jeelib NOT RFu_jeelib

glyn.hudson's picture

Re: compile emonTH_DHT22_DS18B20

I agree, the port to RFu_JeeLib is not ideal. Unfortunately the changes needed were thought to be too wide spread and hardware specific to push back to JeeLib. I have updated RFu_JeeLib to not depend on JeeLib any more (changed line 361 to read "#include <RFu_RF12.h>". 

try updating your Jeelib by doing a Git Pull. https://github.com/openenergymonitor/RFu_jeelib

nomad's picture

Re: compile emonTH_DHT22_DS18B20

it works ;-) thanks

I will try it when I get bask home.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.