Hi,
I already spent two days trying to compile emonTx_CT123.ino with Arduino-MK on the command line of a Raspberry PI.
I hope you can help me. I installed arduino-mk, all libraries and created the following Makefile:
BOARD_TAG = atmega328
ARDUINO_PORT = /dev/ttyAMA0
ARDUINO_LIBS = RFu_jeelib EmonLib OneWire DallasTemperature OpenEngeryMonitor
ARDUINO_DIR = /usr/share/arduino
include /usr/share/arduino/Arduino.mk
In the directory "~/sketchbook/emonTx_CT123" I copied "emonTx_CT123.ino" and "emontx_lib.ino" from the OpenEnergyMonitor GitHub. I changed include JeeLib into include RFu_JeeLib.h.
During Make I'm getting the the Error Message:
build-cli/emonTx_CT123.cpp: In function ‘void loop()’:
build-cli/emonTx_CT123.cpp:122:18: error: ‘send_rf_data’ was not declared in this scope
build-cli/emonTx_CT123.cpp:124:19: error: ‘emontx_sleep’ was not declared in this scope
make: *** [build-cli/emonTx_CT123.o] Error 1
Can you help me? I think I'm close.
Trucki
Re: Compiling EmonTXCT123 with Arduino-MK on Raspberry PI
Hi Trucki,
I don't think arduino-mk supports multiple .ino files at once. emontx_lib.ino is only 2 functions so if you copy and paste them into your emonTx_CT123.ino sketch just before the void setup() line it should work. they need to go in before the body of the sketch as arduino-mk doesn't do pre-compile like the arduino IDE.
Paul