Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 812_hello PCF8591_test_LAAS
PCF8591_AnalogIn Class Reference
Create a PCF8591 AnalogIn object connected to the specified I2C bus and deviceAddress. More...
#include <PCF8591.h>
Public Member Functions | |
PCF8591_AnalogIn (I2C *i2c, uint8_t channel, uint8_t deviceAddress=PCF8591_SA0) | |
Create a PCF8591 AnalogIn object using a specified I2C bus and slaveaddress. | |
float | read () |
Read Analog input. | |
operator float () | |
An operator shorthand for read() | |
Protected Member Functions | |
void | _init () |
Initialise DAC driver. |
Detailed Description
Create a PCF8591 AnalogIn object connected to the specified I2C bus and deviceAddress.
Definition at line 191 of file PCF8591.h.
Constructor & Destructor Documentation
PCF8591_AnalogIn | ( | I2C * | i2c, |
uint8_t | channel, | ||
uint8_t | deviceAddress = PCF8591_SA0 |
||
) |
Create a PCF8591 AnalogIn object using a specified I2C bus and slaveaddress.
Create a PCF8591 AnalogIn object connected to the specified I2C bus and deviceAddress.
- Parameters:
-
I2C &i2c the I2C port to connect to channel ADC channel of the PCF8591 char deviceAddress the address of the PCF8591
Definition at line 232 of file PCF8591.cpp.
Member Function Documentation
void _init | ( | ) | [protected] |
operator float | ( | ) |
An operator shorthand for read()
Operator float Analog Input.
- Returns:
- analogIn value (0 .. 1.0)
Definition at line 274 of file PCF8591.cpp.
float read | ( | ) |
Generated on Tue Jul 12 2022 17:26:42 by
