#include <MCP4018-SOLDERED.h>
Inherits EasyC.
|
| MCP4018_SOLDERED () |
| MCP4018 constructor.
|
|
void | setWiperPercent (int _wiper) |
| Set wiper new position in percents.
|
|
void | setWiperValue (int _byte) |
| Set wiper new position with digital word.
|
|
int | getWiperPercent () |
| Read current wiper position in percents.
|
|
uint8_t | getWiperValue () |
| Read current wiper position in form of digital word.
|
|
void | increment () |
| Increment current wiper position by one digital word (not percent!).
|
|
void | decrement () |
| Decrement current wiper position by one digital word (not percent!).
|
|
| EasyC () |
| Main constructor for easyC version.
|
|
void | begin () |
| Initializes sensors on native or easyC on default address.
|
|
void | begin (uint8_t _address) |
| Initializes sensors on supplied i2c address.
|
|
int | sendAddress (char regAddr) |
| Private function to send a single byte to sensor.
|
|
int | readData (char a[], int n) |
| Private function to read n bytes over i2c.
|
|
int | readRegister (char regAddr, char a[], size_t n) |
| Private function to send over i2c and then read n bytes.
|
|
int | sendData (const uint8_t *a, int n) |
| Private function to write n bytes over i2c.
|
|
|
void | initializeNative () |
| Overloaded function for virtual in base class to initialize sensor specific.
|
|
◆ MCP4018_SOLDERED()
MCP4018_SOLDERED::MCP4018_SOLDERED |
( |
| ) |
|
◆ decrement()
void MCP4018_SOLDERED::decrement |
( |
| ) |
|
Decrement current wiper position by one digital word (not percent!).
◆ getWiperPercent()
int MCP4018_SOLDERED::getWiperPercent |
( |
| ) |
|
Read current wiper position in percents.
- Returns
- Wiper position in percents (0 - 100) with respect to GND potentiometer pin.
◆ getWiperValue()
uint8_t MCP4018_SOLDERED::getWiperValue |
( |
| ) |
|
Read current wiper position in form of digital word.
- Returns
- Wiper position in digital word (0 - 127) with respect to GND potentiometer pin.
◆ increment()
void MCP4018_SOLDERED::increment |
( |
| ) |
|
Increment current wiper position by one digital word (not percent!).
◆ initializeNative()
void MCP4018_SOLDERED::initializeNative |
( |
| ) |
|
|
protectedvirtual |
Overloaded function for virtual in base class to initialize sensor specific.
Implements EasyC.
◆ setWiperPercent()
void MCP4018_SOLDERED::setWiperPercent |
( |
int | _wiper | ) |
|
Set wiper new position in percents.
- Parameters
-
int | _wiper Wiper position in percents (0 - 100 percent) from GND potentiometer pin. |
◆ setWiperValue()
void MCP4018_SOLDERED::setWiperValue |
( |
int | _byte | ) |
|
Set wiper new position with digital word.
- Parameters
-
int | _byte Wiper position with digital word (0 - 127) from GND potentiometer pin. |
◆ _value
uint8_t MCP4018_SOLDERED::_value |
|
private |
The documentation for this class was generated from the following files: