-
Notifications
You must be signed in to change notification settings - Fork 0
NTC B57164
Alex Krieg edited this page May 25, 2018
·
6 revisions
- B57164NTC(byte pin);
- ~B57164NTC();
- void update();
- void read();
- float temperature();
- void onHigherThan(float temperature,void (*p_func)(float));
- void onLowerThan(float temperature,void (*p_func)(float));
- Constructor
- Needs the analog input pin on which the sensor is connected to.
B57164NTC myTempSensor(A0);
Temperature myTempSensor(A0);
- Destructor
delete &myTempSensor;
- Reads the sensor value.
- Triggeres the events
myTempSensor.update();
- Reads the sensor.
- Included in .update().
myTempSensor.read();
- Returns the temperature in °C.
float temperature = myTempSensor.temperature();
You do not know how events work?
Look over here
- Is executed when the temperature is higher than temperature.
- ONE value accepted, The current temperature.
- NO return values.
- Is executed when the temperature is lower than temperature.
- ONE value accepted, The current temperature.
- NO return values.
Wiki
Arduino libraries