What should I #include in in a library?
edit: while question below might still legit in way, premise wrong: adafruit_pwmservodriver include wire in cpp file. it's problem wiht esp8266 build environment misinterpreted missing wire include, because example adafruit lib exlicitly includes wire, while did not. sorry.
edit2: issue adafruit lib falsely identified esp arduino due , tried use wire1 instead of wire
hi,
i writing library deal recurring task of controlling lights mqtt. basicall, set of simple child classes dim light using different techniques (currently: analogwrite mosfet, or adafruit_pwmservodriver dedicated pwm boards), report status mqtt , deal topics commands , states.
obviously, adafruit_pwmservodriver-base library uses adafruit_pwmservodriver class, included this. when debugging, noticed adafruit_pwmservodriver uses wire.h, not include it.
is allow other includes provide wire implementation? in cases should include other headers code depends on , in shouldn't i.
i guess shouldn't when goes close hardware, perhaps?
edit2: issue adafruit lib falsely identified esp arduino due , tried use wire1 instead of wire
hi,
i writing library deal recurring task of controlling lights mqtt. basicall, set of simple child classes dim light using different techniques (currently: analogwrite mosfet, or adafruit_pwmservodriver dedicated pwm boards), report status mqtt , deal topics commands , states.
obviously, adafruit_pwmservodriver-base library uses adafruit_pwmservodriver class, included this. when debugging, noticed adafruit_pwmservodriver uses wire.h, not include it.
is allow other includes provide wire implementation? in cases should include other headers code depends on , in shouldn't i.
i guess shouldn't when goes close hardware, perhaps?
Arduino Forum > Using Arduino > Programming Questions > What should I #include in in a library?
arduino
Comments
Post a Comment