Hi,
I received my emonPi2 kit today to monitor my Heat Pump but have run into a problem trying to compile the firmware to enable the analog input for monitoring my Ecodan Sika flow sensor. I have followed the instructions in the docs for both the PlatformIO method and the Arduino IDE method and both show the same error:
/Users/craig/Development/OpenEnergyMonitor/avrdb_firmware/emon_DB_6CT/emon_DB_6CT.ino: In function 'void setup()':
/Users/craig/Development/OpenEnergyMonitor/avrdb_firmware/emon_DB_6CT/emon_DB_6CT.ino:204:3: error: 'Wire1' was not declared in this scope
Wire1.swap(2);
^~~~~
/Users/craig/Development/OpenEnergyMonitor/avrdb_firmware/emon_DB_6CT/emon_DB_6CT.ino:204:3: note: suggested alternative: 'Wire'
Wire1.swap(2);
^~~~~
Wire
Compiling .pio/build/Upload_USART/FrameworkArduino/UART0.cpp.o
Archiving .pio/build/Upload_USART/lib412/libemonEProm.a
*** [.pio/build/Upload_USART/src/emon_DB_6CT.ino.cpp.o] Error 1
I’m a software developer and also an electronics engineer so although the emonPi2 is new to me, I’m very familiar with software, electronics and micro controllers. But I’ve been trying all sorts of things this evening to resolve my problem without success. Well, I might have solved the problem but I need a sanity check first.
I believe the issue is to do with the Wire interface and I noticed in the Arduino IDE, there is an option to configure this interface in 4 different ways:
If I set this to one of the 2x options then it compiles fine but I don’t know which of these is the correct one to choose.
Also, if I #define ENABLE_ANALOG
then do I need to change #define PULSE_PIN 3
to some other value? If I comment out this define then I get loads of compile errors but I don’t know what effect setting it to 1 or 2 might have.
Any advice would be most welcome.
Many thanks,
Craig.