EnAccess/OpenSmartMeter

Convert `helpers.ino` to a HPP file

dmohns opened this issue · 0 comments

Steps:

  1. Rename the file from .ino to .hpp
  2. Add the generic header to the file, namely
#pragma once

// defines

// Arduino base libraries

// third party libraries

// OpenSmartMeter libraries
  1. Add #include to the smart_energy_meter.ino (for now, move it to the top of // OpenSmartMeter libraries)
  2. Run pio run to build the code, it will probably fail, but will help you with the next 2 steps.
  3. Move all variable declarations that are only needed in helpers.hpp from smart_energy_meter.ino
  4. Add all #include from other SmartMeterLibraries

Two examples where the above steps have been done for other files, are here