upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Member Functions | Static Public Attributes

API for the MAX5487 SPI Digital Potentiometer. More...

Detailed Description

Maxim Integrated* MAX5487 is a dual, 256-tap, nonvolatile, SPI, linear-taper digital potentiometer. This module was tested on the Maxim Integrated MAX5487PMB1 PMOD module from the analog PMOD kit.

upm::MAX5487 sensor(7);
// Power LED UP
for (int i = 0; i < 255; i++) {
// Power LED DOWN
for (int i = 0; i < 255; i++) {
sensor.setWiperA(255 - i);

Public Member Functions

 MAX5487 (int csn=-1)
void setWiperA (uint8_t wiper)
void setWiperB (uint8_t wiper)
std::string name ()

Static Public Attributes

static const uint8_t R_WR_WIPER_A = 0x01
static const uint8_t R_WR_WIPER_B = 0x02

Constructor & Destructor Documentation

MAX5487 ( int  csn = -1)

Instantiates an MAX5487 object

csnCSN to use, if any; by default, ICSP CS (-1) is used

Member Function Documentation

void setWiperA ( uint8_t  wiper)

MAX5487 object destructor, closes all IO connections no more needed as the connections will be closed when m_spi and m_csnPinCtx will go out of scope ~MAX5487 (); Sets a wiper for port A.

void setWiperB ( uint8_t  wiper)

Sets a wiper for port B.

std::string name ( )

Returns the name of the component

The documentation for this class was generated from the following files: