Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

KLib-Sensor

KLib-Sensor is a lightweight library for managing sensor values and detecting changes.

Installation

Using PlatformIO

Add the following to platformio.ini:

lib_deps = https://github.com/KazaLab/KLib-EnvSensor.git

Usage

#include<KLib_Sensor.h>
KLib_Sensor temperatureSensor("temperature");
voidsetup() {
Serial.begin(115200);
}
voidloop() {
float newTemperature = random(20, 30); // Simulated temperature valueif (temperatureSensor.hasChanged(newTemperature, 0.5)) {
Serial.print("New Temperature: ");
Serial.println(newTemperature);
temperatureSensor.updateValue(newTemperature);
}
delay(2000);
}

About

Simple sensor class for value tracking and change detection

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages