![]() |
Erriez Oregon THN128 433MHz temperature sensor library for Arduino 1.1.1
This is an Oregon THN128 433MHz temperature sensor transmit/receive library for Arduino.
|
Oregon THN128 433MHz temperature transmit/receive library for Arduino. More...
#include <string.h>#include <stdio.h>#include "ErriezOregonTHN128.h"
Go to the source code of this file.
Macros | |
| #define | SET_ROL_ADDR(x) (((x) & 0x07) << 0) |
| #define | GET_ROL_ADDR(x) (((x) & 0x07) << 0) |
| #define | SET_CHANNEL(x) ((((x) - 1) & 0x03) << 6) |
| #define | GET_CHANNEL(x) ((((x) >> 6) & 0x03) + 1) |
| #define | SET_TEMP(x) |
| #define | GET_TEMP(x) |
| #define | SIGN_BIT (1UL << 21) |
| #define | LOW_BAT_BIT (1UL << 23) |
| #define | SET_CRC(x) ((uint32_t)(x) << 24) |
| #define | GET_CRC(x) ((x) >> 24) |
Functions | |
| bool | OregonTHN128_CheckCRC (uint32_t rawData) |
| Verify checksum. | |
| void | OregonTHN128_TempToString (char *temperatureStr, uint8_t temperatureStrLen, int16_t temperature) |
| Convert temperature to string. | |
| uint32_t | OregonTHN128_DataToRaw (OregonTHN128Data_t *data) |
| Convert data structure to 32-bit raw data. | |
| bool | OregonTHN128_RawToData (uint32_t rawData, OregonTHN128Data_t *data) |
| Cnonvert 32-bit raw data to OregonTHN128Data_t structure. | |
Oregon THN128 433MHz temperature transmit/receive library for Arduino.
Source: https://github.com/Erriez/ErriezOregonTHN128 Documentation: https://erriez.github.io/ErriezOregonTHN128
Definition in file ErriezOregonTHN128.c.
| bool OregonTHN128_CheckCRC | ( | uint32_t | rawData | ) |
Verify checksum.
| rawData | 32-bit raw data input |
Definition at line 101 of file ErriezOregonTHN128.c.
| uint32_t OregonTHN128_DataToRaw | ( | OregonTHN128Data_t * | data | ) |
Convert data structure to 32-bit raw data.
| data | Input |
Definition at line 141 of file ErriezOregonTHN128.c.
| bool OregonTHN128_RawToData | ( | uint32_t | rawData, |
| OregonTHN128Data_t * | data | ||
| ) |
Cnonvert 32-bit raw data to OregonTHN128Data_t structure.
| rawData | 32-bit input |
| data | output |
Definition at line 180 of file ErriezOregonTHN128.c.
| void OregonTHN128_TempToString | ( | char * | temperatureStr, |
| uint8_t | temperatureStrLen, | ||
| int16_t | temperature | ||
| ) |
Convert temperature to string.
| temperatureStr | Character buffer |
| temperatureStrLen | Size of character buffer |
| temperature | Input temperature |
Definition at line 118 of file ErriezOregonTHN128.c.