GY-63_MS5611/libraries/ADG731/README.md
2023-07-24 20:33:28 +02:00

2.2 KiB

Arduino CI Arduino-lint JSON check License: MIT GitHub release

ADG731

Arduino library for ADG731 - 32 to 1 channel multiplexer.

Description

Experimental

ADG731 is an Arduino class that controls a 1 x 32 multiplexer over a SPI like interface. Only one of the 32 channels can be connected at the same time. The library also support to set them all off (17th state).

This library can be used to connect 32 analog devices to one analog port.

On power-up, all switches are in the OFF state.

This library can be used e.g. to connect 32 analog devices to one analog port, or to select between 32 DHT22 sensors.

Not tests with hardware have been done yet, so use with care. Feedback welcome!

TODO insert picture.

Interface

#include "ADG731.h"
  • ADG731(uint8_t clockPin, uint8_t dataPin, uint8_t syncPin) constructor.
  • void setChannel(uint8_t channel) set the current channel. Valid values for channel are 0..31.
  • uint8_t getChannel() get last set channel == 0..31 or ADG731_ALLOFF.
  • uint8_t channelCount() returns 32 for ADG731.

Future

Must

  • improve documentation
  • test with hardware

Should

  • add examples
  • check performance

Could

Wont