EmonLib.h works for both ESP32 and ESP8266?

There are two github links for ESP related Energy Monitor:

Dan Pieg's ESP32EnergyMonitor: GitHub - danpeig/ESP32EnergyMonitor: Multiple phase DIY energy consumption monitor using ESP32 and ESPHome
and
Gyln Hudson's openenergymonitor/EmonLib: GitHub - openenergymonitor/EmonLib: Electricity monitoring library - install in Arduino IDE's libraries folder then restart the IDE

I have both of these added to IDE 2 Preferences > Additional Boards Manger URLs.

I ran the Examples ino code from the Emon.h library called "voltage_and _current".
On the ESP32 WROOM processor it ran fine and the serial output looked like it should.
On the ESP8266MOD processor that I have board assigned as Lolin(Wemos) D1 mini (clone) the same sketch produced a strange serial monitor output and the
added blink routine was slowed way down beyond the set values.

So I am wondering if there needs to be a different ino code for the 8266. I can use
the ESP32 its just that the 8266 is smaller and more compact for where I want to locate it.

bump...

two errors:

  1. don't bump.
  2. always always always post text-information as a code-section and not as screenshot

you are decreasing the probability to receives answers with screenshots.

Me personal I don't use the IDE 2 for a particular reason.

The IDE 2 is unable to do a proper copy off all output of the serial monitor.

And the development-team of the IDE 2.0 sees this issue as a minor issue that only might be solved in the next decade. Year 2030 upwards.

In my opinion this is a shame. Serial printing to the serial monitor is the major debug-technique.

This is the reason why I'm still using IDE 1.8.19. Copy from the serial monitor works for hundreds of lines like a charm.

@ptillisch :
does the IDE-development team have the serial-monitor-issue now high on their priority-list?
or
as an alternative:
does step-by-step code-execution work for all microcontrollers next week?

best regards Stefan

1 Like

Okay. How do I copy the serial screen output info? I tried but could not get anything to copy hence the screenshot.

It does work only rudimentary with arduino IDE 2.X.
It works very well with arduino IDE 1.8.19:

In IDE 1.8.19 the serial monitor has its own window.
You simply click into the extra window of the serial monitor and press ctrl-a, ctrl-c
and then the whole content of the serial monitor is inside the clipboard reay to paste with ctrl-v.

You can download a portable version of the IDE 1.8.19 from here
https://downloads.arduino.cc/arduino-1.8.19-windows.zip

For simple serial receiving it is not nescessary to install ESP32 board support.
Serial is serial. Just terminate IDE 2.X and start IDE 1.8.19 adjust com-port and open the serial monitor.

best regards Stefan

What is the key sequence used?

I still use the 1.8.19 on my little Dell laptop to remote load UNO Rev2s in the field.
What do you mean by portable version?

Arduino IDE 1.8.19 can be configured as "portable"
If you already have Arduino IDE 1.8.19 just uses as it is

I don't know because I don't use IDE 2.X. I guess you click into the serial monitor window section and then use ctrl-a, ctrl-c like always.
But as far as I know it does only copy a few visible lines in IDE 2.X

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.