Skip to content

These are libraries that can be used with an Arduino to allow for easily reading/writing data to and from a (de)multiplexer.

Notifications You must be signed in to change notification settings

pdnelson/Arduino-Multiplexer-Demultiplexer-Libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Arduino Multiplexer/Demultiplexer Libraries

Description

Multiplexers are useful if you have a variety of devices you would like to collect binary data from, but you are out of pins to use to collect that data. This library allows easy use of multiplexers with an Arduino to accomplish this. This can also be used if you want to set more devices' values than what your Arduino will support.

Multiplexer and Demultiplexer

To use this library, all you need to do is pass through whatever Arduino pins correspond to your multiplexer's common input/output pin, selector pins, and then set the propagation delay.

Once setup has commenced, you can call readDigitalValue and pass in an 8-bit unsigned value corresponding to one of the input pins on your arduino. For example, calling readDigitalValue(5) will read from the multiplexer's input pin labeled 5.

For using the demultiplexer, writing writeDigitalValue(5, HIGH) will set the demultiplexer's output pin labeled 5 to HIGH

Warning: Propagation delay is very important when implementing this. If there is no delay set, values could be unpredictable and be very difficult to debug. I recommend the higher end of 6-10 microseconds.

Installation

  1. Clone this repository
  2. Move the Multiplexer and Demultiplexer directories into your user's Arduino/libraries directory.
  • For more specific directory references, refer to this link.
  1. Lastly, include the library by writing #include <Multiplexer.h> and/or #include <Demultiplexer.h> at the top of the file you would like to use it.

About

These are libraries that can be used with an Arduino to allow for easily reading/writing data to and from a (de)multiplexer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages