dart_periphery library
Classes
- AHTX0
- AHT10, AHT20 temperature and humidity sensor.
- BakeBitLedBar
- Helper class for the BakeBit LED bar - see NanoHatHub.ledBarInitExt for details.
- BME280
- Bosch BME280/BMP280 sensor for temperature, pressure and humidity (BME280 only).
- BME280result
- BME280 measured data: temperature, pressure and humidity (BME280 only).
- BME680
- Bosch BME680 sensor for temperature, humidity, pressure and gas sensor (IAQ Indoor air quality).
- BME680result
- BME680 measured data: temperature, pressure, humidity and IAQ sensor.
- DS1307
- DS1307/D3231 real time clock
- DummyDev
- Dummy sensor for development.
- Errno
- Helper class for Linux errno.h definitions.
- FeatureSetVersion
- Set of internal SGP30 features
- GestureSensor
- PixArt PAJ7620U2 chip, can recognize 9 basic gestures.
- GPIO
- GPIO wrapper functions for Linux userspace character device gpio-cdev and sysfs GPIOs.
- GPIOconfig
- Configuration class for GPIO.advanced and GPIO.nameAdvanced.
- GPIOreadEvent
- Result of the GPIO.readEvent().
- GroveBaseHat
- Grove Base Hat RaspberryPi
- GrovePiPlusHat
- SeedStudio GrovePiPlusHat
- I2C
- I2C wrapper functions for Linux userspace i2c-dev devices.
- I2Cmsg
- I2Cmsg - container for the native NativeI2Cmsg struct.
- IsolateAPI
- Interface for pass device info as JSON to an isolate.
- Led
- LED wrapper functions for Linux userspace sysfs LEDs.
- MCP9808
- MCP9808 - high accuracy temperature sensor
- MCP9808result
- MCP9808 measured data: temperature
- MLX90615
- MLX90615 - digital infrared non-contact temperature sensor
- MLX90615result
- MLX90615 measured data: temperature
- MMIO
-
MMIO wrapper functions for the Linux userspace
/dev/mem
device. - MPU6050
- MPU-6050 Six-Axis (Gyro + Accelerometer) sensor
- NanoHatHub
- Extension hat from FriendlyARM
- NativeI2Cmsg
- Helper class mapped to the C struct i2c_msg
- NativeI2CmsgHelper
- Helper class which stores an array of native 'struct i2c_msg' messages. The user must call NativeI2CmsgHelper.dispose to free the allocated memory.
- PCF8591
- PN532
- PN532BaseProtocol
- PN532I2CImpl
- PN532SpiImpl
- PollMultipleEvent
- Helper class for the static method GPIO.pollMultiple.
- PWM
- PWM wrapper functions for Linux userspace sysfs PWMs.
- RawLuminosity
- TSL2591 data class for raw values.
- RawMeasurement
- SGP30 raw data container for H₂ and Ethanol
- SDC30
- SDC30 CO₂ & Temperature & Humidity Sensor
- SDC30result
- SDC30 measured data: CO2, temperature and humidity.
- Serial
- Serial wrapper functions for Linux userspace termios tty devices.
- SerialReadEvent
- Result of a Serial.read operation.
- SGP30
- Sensirion eCO2 gas sensor, an air quality detection sensor.
- SGP30result
- SGP30 measured data: co2Equivalent and totalVOC sensor.
- SHT31
- Sensirion SHT31 temperature and humidity sensor with a high accuracy.
- SHT31result
- SHT31 measured data: temperature and humidity sensor.
- SHT4x
- Sensirion SHT4x temperature and humidity sensor with a high accuracy.
- SHT4xresult
- SHT4x measured data: temperature and humidity sensor.
- SI1145
- SiLabs SI1145 sensor for visible & IR light and UV index.
- SPI
-
SPI wrapper functions for Linux userspace
spidev
devices. - SSD1306
- SSD1306 128 x 64 Dot Matrix OLED
- TSL2591
- TSL2591 sensor for visible, IR light, full spectrum and lux
-
Uint<
T extends Uint< T> > - Uint16
- Uint32
- Uint8
- VL53L0X
- VL53L0X sensor - Time-of-Flight (ToF) laser-ranging module.
- VL53L0Xresult
- VL53L0X measured data: range
Enums
- AHTX0command
- AHTX0 commands
- AirQuality
- IAQ values: excellent - invalidValue - contaning range and color
- Baudrate
- Serial baud rate
- BitOrder
- Bit order of multiple byte data of I2C or SPI devices. This order is defined by manufacturer of the device.
- BME280model
- Supported bme280 models
- DataBits
- Serial number of data bits
- DigitalValue
- Digital pin value
- ERRNO
- Dart enum representation of the Linux errno.h definitions.
- FilterCoefficient
- BME280 IIR Filter coefficient
- FilterSize
- BME680 IIR filter size
- Gain
- TSL2591 gain
- Gesture
- Gesture sensor PAj7620 directions
- GPIObias
- GPIO bias
- GPIOdirection
- GPIO input/output direction
- GPIOdrive
- GPIO drive
- GPIOedge
- GPIO edge
- GPIOerrorCode
- Mapped native GPIO error codes with the same index, but different leading sign.
- GPIOpolling
- Result codes of the GPIO.poll.
- HeaterProfile
- BME680 gas heater profile
- I2CerrorCode
- I2C error codes
- I2CmsgFlags
-
I2C native i2c_msg flags from
<linux/i2c.h>
- converted only to lower case camel case looks a little strange - IntegrationTime
- TSL2591 timings
- LedBarColor
- LED bar color - see NanoHatHub.ledBarInitExt for details.
- LedBarLed
- LED bar led numeration - see NanoHatHub.ledBarInitExt for details.
- LedErrorCode
- Led error code
- MMIOerrorCode
- MMIO error code
- Mode
- SHT4x sensor mode
- OperatingMode
- BME280 operation mode
- OversamplingMultiplier
- Oversampling multiplier definition for BME280, BMP280 and BME680 sensors.
- Parity
- Serial parity
- Pin
- PCF8591 pins
- PinMode
- Pin mode
- Polarity
- PWM polarity of the output
- PowerMode
- BME680 power modes
- PWMerrorCode
- PWM error code
- RegisterWidth
- I2C register width, 8 or 16 bits - I2C EEPROMs support 16-bit registers
- SerialErrorCode
- Serial error codes
- SI1145cmd
- SI1145 specific commands
- SI1145param
- SI1145 specific parameter
- SI1145reg
- SI1145 specific register
- SPImode
- SPI modes
- StandbyDuration
- BME280 inactive duration in standby mode
- StopBits
- Number of Serial stop bits
Extensions
- CharacterCase on String
- Helper for lower/uppercase checking
Constants
- ahtx0DefaultI2Caddress → const int
- Default I2C address of the AHTX0 sensor
- bme280AlternativeI2Caddress → const int
- Alternative I2C address of the BME280 sensor
- bme280DefaultI2Caddress → const int
- Default I2C address of the BME280 sensor
- bme280Id → const int
- BME280 hardware ID
- bme680AlternativeI2Caddress → const int
- Alternative I2C address of the BME680 sensor
- bme680DefaultI2Caddress → const int
- Default I2C address of the BME680 sensor
- bmp280Id → const int
- BMP280 hardware ID
- dartPeripheryVersion → const String
- dart_periphery version
- ds1307DefaultI2Caddress → const int
- Default address of the DS1307 sensor.
- mcp9808DefaultI2Caddress → const int
- Default address of the MCP9808 sensor.
- mlx90615DefaultI2Caddress → const int
- Default address of the MLX90615 sensor.
- paj7620DefaultI2Caddress → const int
- Default I2C address of the PAj7620 gesture sensor
- pcf8591DefaultI2Caddress → const int
- Default I2C address of the PCF8591 ADC
- sdc30DefaultI2Caddress → const int
- Default I2C address of the SDC30 sensor
- sensorReadRetryCounter → const int
- BME680 retry counter
- sgp30DefaultI2Caddress → const int
- Default I2C address of the SGP30 sensor
- sht31AlternativeI2Caddress → const int
- Alternative I2C address of the SHT31 sensor
- sht31DefaultI2Caddress → const int
- Default I2C address of the SHT31 sensor
- sht4xDefaultI2Caddress → const int
- Default I2C address of the SHT4x sensor
- si1145DefaultI2Caddress → const int
- Default I2C address of the SI1145 sensor
- ssd1306DefaultI2Caddress → const int
- Default address of the SSD1306 display.
- tsl2591DefaultI2Caddress → const int
- Default I2C address of the TSL2591 sensor
- vl53L0xDefaultI2Caddress → const int
- Default address of the VL53L0X sensor.
Functions
-
checkCRC(
List< int> data) → bool - Checks data chunks according following schema: 2 bytes data and 1 byte crc
-
crc8(
List< int> data) → int - CRC8 checksum
-
getAirQuality(
int iaq) → AirQuality -
Returns an AirQuality for a
iaq
value. -
getCperipheryVersion(
) → String - Returns the version of the native c-periphery library.
-
getFlutterPiArgs(
) → List< String> - Returns the argument list of the running flutter-pi program by reading the /proc/PID/cmdline data. For a non flutter-pi environment an empty list will be returned.
-
getPeripheryLibPath(
) → String - Returns the path of the periphery library. Empty string. if the library is not loaded.
-
getPID(
) → int - Returns the PID of the running program for linux, -1 for all other platforms.
-
isFlutterPiEnv(
) → bool - Returns true for a flutter-pi environment.
-
loadLibFromFlutterAssetDir(
bool use) → void - Loads the library form the flutter-pi asset directory.
-
loadPeripheryLib(
) → DynamicLibrary - Loads the Linux/CPU specific periphery library as a DynamicLibrary.
-
reuseTmpFileLibrary(
bool reuse) → void - Allows to load an existing libperiphery.so file from tmp directory.
-
setCustomLibrary(
String absolutePath) → void - dart_periphery loads a custom library. See native-libraries for details.
-
setLinuxLocalTime(
DateTime dt) → bool - Sets the linux system (local) time using a DateTime.
-
setTempDirectory(
String tmpDir) → void -
Sets the tmp directory for the extraction of the
libperiphery.so
file. -
useLocalLibrary(
) → void - dart_periphery loads the library from the actual directory. See native-libraries for details.
- dart_periphery loads the shared library. See native-libraries for details.
Typedefs
- ListCompare = bool Function(List, List)
- PN532ReadyFunction = bool Function(int attemptCount)
Exceptions / Errors
- AHTX0exception
- AHTX0 exception
- BME280exception
- BME280 exception
- BME680exception
- BME680 exception
- DS1307exception
- DS1307 exception
- ErrnoNotFound
- Exception
- GestureSensorException
-
PAj7620
exception - GPIOexception
- GPIO exception
- I2Cexception
- I2C exception
- LedException
- Led exception
- MCP9808exception
- MCP9808 exception
- MLX90615exception
- MLX90615 exception
- MMIOexception
- MMIO exception
- MPU6050exception
- MPU6050 exception
- PCF8591exception
- PCF8591 exception
- PN532BadResponseException
- PN532Exception
- The abstract base class for all exceptions
- PN532MoreThenOneTagsFoundException
- PN532NotReadyException
- PN532NotToHostResponse
- PN532TimeoutException
- PN532WrongAckException
- PN532WrongFirmwareException
- PN532WrongResponseException
- PWMexception
- PWM exception
- SDC30exception
- SDC30 exception
- SerialException
- Serial exception
- SGP30exception
- SGP30 exception
- SHT31exception
- SHT31 exception
- SHT4xException
- SHT4x exception
- SI1145exception
- SI1145 exception
- SPIexception
- SPI exception
- TSL2591exception
- TSL2591 exception
- VL53L0Xexception
- VL53L0X exception