Community
OpenEnergyMonitor

Community

Upload of sketch to heatpumpmonitor errors (Fail)

Tags: #<Tag:0x00007f6e13d474b0>

Hi Guys,

I am new to microcontrollers (1 month or so) and have recently got the heatpump monitor for a project I am working on. have soldered all parts on to board as of guide, I hope correctly.

been having a bit of a mare uploading code to the chip. have tried the Arduino IDE and no luck. have tryed platform IO (in VS code) but again no luck. I think I am doing something fundamentally wrong…

I have connected both the usb power to the board and the usbprogrammer to the headers closest to the ATmega chip.

I cloned the GitHub repository set up my IDE to use ~/HeatpumpMoniter as the sketchbook location when I try upload / verify the HeatpumpMonitor_AutoTemp.ino i get various complaints before it terminates.

I have included some screen shots of attempts at both editors. (note I installed some library’s as compiler was complaining that they did not exist)

I have the board set to the below, with displayed parameters (edit) posted images below due to new uer limit

Hope someone can help

attempt in PIO ^^

I don’t have the hardware, however I can compile the sketch. As you mentioned, you need extra libraries that are mentioned at the top of the sketch.

I cannot use platformio. You should set up your Arduino IDE according to the instructions in Learn - “Using the Arduino IDE”. When you have also installed the libraries listed, you need two more, which you install in exactly the same way as the others:
Custom Software Serial https://github.com/ledongthuc/CustomSoftwareSerial.git
and
Elster Meter Reader https://github.com/openenergymonitor/ElsterMeterReader.git
The extra copies of the libraries that it is complaining about can be deleted.

The compiler does warn (for an Arduino Uno) that it is low on memory. There are other warnings, but without studying the code in detail, I cannot say what the cause is, nor what the remedy might be.

It looks to me as if there are two items of firmware to be uploaded - for the ATmega328 and for the ESP8266.

You should be connecting your programmer to the 6-pin FTDI connector that is closest to the ATmega328 to program that, as per the build instructions, The ATmega328 is a “Arduino Uno”. The second FTDI connector immediately next to the ESP8266 connects to that, according to the drawings.
Someone who knows should clarify this.

1 Like

Thanks Robert,

Come at it today with a fresh head and your advice and I am pleased to say I have managed to upload onto the ATmega328. Changed board type to Arduino Uno in the IDE and I copied all the contents of /libraries in /Firmware/Ardiuno to the libraries folder where my sketchbook was located:

Now onto the ESP8266. Wish me luck :smile: