Basic IOT over BLE advertisements.
Author(s): Scott Shawcroft
- class adafruit_ble_broadcastnet.AdafruitSensorMeasurement(*, entry=None, sequence_number=0)¶
A collection of sensor measurements.
Total Volatile Organic Compounds as a float in parts per billion.
Acceleration as (x, y, z) tuple of floats in meters per second per second.
Battery voltage in millivolts. Saves two bytes over voltage and is more readable in bare packets.
Color as RGB integer.
Current as a float in milliamps.
Distance as a float in centimeters.
16-bit PWM duty cycle. Independent of frequency.
Equivalent CO2 as a float in parts per million.
As integer Hertz
Gyro motion as (x, y, z) tuple of floats in radians per second.
Brightness as a float without units.
Brightness as a float in SI lux.
Magnetism as (x, y, z) tuple of floats in micro-Tesla.
Absolution orientation as (x, y, z) tuple of floats in degrees.
Pressure as a float in hectopascals.
Relative humidity as a float percentage.
Sequence number of the measurement. Used to detect missed packets.
Split the measurement into multiple measurements with the given max_packet_size. Yields each submeasurement.
Temperature as a float in degrees centigrade.
16-bit unit-less value. Used for analog values and for booleans.
Voltage as a float in Volts.
Weight as a float in grams.
- adafruit_ble_broadcastnet.broadcast(measurement, *, broadcast_time=0.1, extended=False)¶
Broadcasts the given measurement for the given broadcast time. If extended is False and the measurement would be too long, it will be split into multiple measurements for transmission.