ADS1256 Board¶
From: Raspberry Pi Compatible Components
Class: herosdevices.hardware.raspberrypi.waveshare.WaveshareADS1256
Driver Quality Index: beta
This class represents one channel of the Waveshare ADS1256 ADC board.
Note
Concurrent access to the SPI device is not possible. This means only one object with a given spi_bus and spi_device can exist.
If you would like to access individual channels of this ADC consider creating objects of :class:WaveshareADS1256Channel in addition to an object of this class.
Bold arguments are mandatory. For more information on the listed arguments refer to the class documentation: herosdevices.hardware.raspberrypi.waveshare.WaveshareADS1256 If parameters appear in this list but not in the class definition, please recursively check the linked base classes for the definition of the parameter.
Argument |
Type |
Default Value |
Description |
|---|---|---|---|
spi_bus |
<class ‘int’> |
0 |
number of the SPI bus |
spi_device |
<class ‘int’> |
0 |
number of the SPI device in bus. |
rst_pin |
<class ‘int’> |
18 |
|
drdy_pin |
<class ‘int’> |
17 |
|
gain |
<class ‘int’> |
1 |
gain to set in the PGIA |
drate |
<class ‘str’> |
2000SPS |
conversion rate of the ADS1256. See .ads1256.ADS1256_DRATE for valid values |
vref |
<class ‘float’> |
5.0 |
Reference voltage given to the ADC. Usually 3.3V or 5V |
channel_name_map |
dict[str, str] | None |
None |
dict to map the internal names of the pin (AIN0…AIN7) to user-definable names. The names are used if the operated as HEROS datasource. |
The following JSON strings can be used to start a HERO device representation of WaveshareADS1256 using BOSS.
{
"_id": "my_WaveshareADS1256",
"classname": "herosdevices.hardware.raspberrypi.waveshare.WaveshareADS1256",
"arguments": {
"spi_bus": 0,
"spi_device": 0,
"rst_pin": 18,
"drdy_pin": 17,
"gain": 1,
"drate": "2000SPS",
"vref": 5.0,
"channel_name_map": {
"AIN0": "my_voltage",
"AIN2": "custom_sensor_3"
}
}
}
generated from signature