Analog
Python Library for TI ADS1018 ADC.
Python Library
Turta_Analog library is responsible for reading analog inputs from the analog ports.
Initialization
Add the following statement to the top of your Python code.
Then, create an instance of the ADC class.
Now you're ready to access the library by calling its instance.
Basic Members
Read Analog Input
Reads the analog value.
Parameters
CH ch: Analog input channel.
Returns
Int: Analog readout.
Read Temperature
Reads the internal IC temperature.
Parameters
Bool fahrenheit: True for Fahrenheit output, False for Celcius output. (False is default.)
Returns
Float: Internal IC temperature.
Advanced Members
Config
Configures the device.
Parameters
CH ch: Input channel. (Input multiplexer configuration.)
PGA pga: Programmable gain amplifier configuration.
MODE mode: Device operating mode.
DR dr: Data rate.
TS_MODE ts_mode: Temperature sensor mode.
Returns
None
Finalizer
When exiting from the program, the library releases the SPI bus.
Last updated