olehs / PZEM004T

Arduino communication library for Peacefair PZEM-004T Energy monitor
MIT License
225 stars 114 forks source link

build-time flag to toggle softwareserial support #43

Closed vortigont closed 5 years ago

vortigont commented 6 years ago

For platforms where softserial is supported SoftwareSerial lib is always linked to the firmware even if not used in sketch at all, it would be nice to have a build-time flag that could disable it. Adding "-DPZEM004_NO_SWSERIAL" to build_flags completely disables SoftwareSerial lib and saves some mcu resources. This could save up to 520/68/72 bytes of text/data/bss mem for esp8266 platform.