![]() |
Data Gator
Hardware and software documentation for the Data Gator project.
|
Contains the definition of the KKM K6P BLE sensor, which is based on the BLESensor.hpp interface. More...
#include <Arduino.h>
#include <sstream>
#include <string.h>
#include <../../include/BLESensor.hpp>
#include <NimBLEAdvertisedDevice.h>
#include <MQTTMailer.hpp>
Go to the source code of this file.
Classes | |
struct | ufloat88 |
Defines structure for floating point numbers in dual 8 bit upper/lower format. More... | |
class | KKMK6P |
Singleton used to identify and parse BLE transmissions from KKMK6P BLE Temperature and Humidity sensors. More... | |
Macros | |
#define | ENDIAN_CHANGE_U16(x) ((((x)&0xFF00)>>8) + (((x)&0xFF)<<8)) |
< Converts endianess for 16 bit integers | |
#define | ENDIAN_CHANGE_U32(x) ((((x)&0xFF000000)>>24) + (((x)&0x00FF0000)>>8)) + ((((x)&0xFF00)<<8) + (((x)&0xFF)<<24)) |
Functions | |
struct ufloat88 | __attribute__ ((packed)) ufloat88 |
Defines structure for floating point numbers in dual 8 bit upper/lower format. | |
std::string | toString () |
Convert struct members upper and lower to a string double value. | |
Variables | |
const bool | USB_DEBUG |
USB serial debugging enabled. | |
int8_t | upper = 0x00 |
the value to the left of the decimal point | |
uint8_t | lower = 0x00 |
the value to the right of the decimal point | |
uint8_t | id = 0x00 |
uint16_t | unknown = 0x0000 |
uint16_t | temp = 0x0000 |
uint16_t | humidity = 0x0000 |
uint8_t | address [6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00} |
char | name [2] = {0x00, 0x00} |
uint8_t | frameType = 0x00 |
uint8_t | version = 0x00 |
uint8_t | sensor_mask = 0x00 |
uint16_t | volt = 0x0000 |
ufloat88 | accX |
ufloat88 | accY |
ufloat88 | accZ |
uint8_t | manufacturerID [6] |
KKMK6P | __attribute__ |
Contains the definition of the KKM K6P BLE sensor, which is based on the BLESensor.hpp interface.
< Converts endianess for 16 bit integers
Converts endianess for 32 bit integers
Defines structure for floating point numbers in dual 8 bit upper/lower format.
Uses the toString member to convert the upper and lower 8 bit values to a string of format <upper>.<lower>
to represent a double.
For example:
std::string toString | ( | ) |
Convert struct members upper and lower to a string double value.
<upper_int>.<lower_int>
.