Convert `helpers.ino` to a HPP file
dmohns opened this issue · 0 comments
dmohns commented
Steps:
- Rename the file from
.ino
to.hpp
- Add the generic header to the file, namely
#pragma once
// defines
// Arduino base libraries
// third party libraries
// OpenSmartMeter libraries
- Add
#include
to thesmart_energy_meter.ino
(for now, move it to the top of// OpenSmartMeter libraries
) - Run
pio run
to build the code, it will probably fail, but will help you with the next 2 steps. - Move all variable declarations that are only needed in
helpers.hpp
fromsmart_energy_meter.ino
- Add all
#include
from other SmartMeterLibraries
Two examples where the above steps have been done for other files, are here