How to create library

Hi y'all

Please I would like to create a library for my project because of the changes in ambient temperature. I want to programme the systems to do different things at different temperature. How can I go about this please. Thanks

Take a look at https://www.arduino.cc/en/Hacking/libraryTutorial

1 Like

Why does that need a library?

You can do what you want with if's or switch...case. The latter lets you examine a range as shown here, so for temps between 2 certain values do some stuff, between other values do different stuff.

Usual reasons for creating a library are things like code re-use, ease of maintenance and portability.
Climate change is a new one on me.

and of course for learning how a library is written, even if it is not required

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