arduino-analog-multiplexer

Library for Arduino in order to use Analog Multiplexer / DeMultiplexers easily (by ajfisher)

Arduino-analog-multiplexer Alternatives

Similar projects and alternatives to arduino-analog-multiplexer

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better arduino-analog-multiplexer alternative or higher similarity.

arduino-analog-multiplexer reviews and mentions

Posts with mentions or reviews of arduino-analog-multiplexer. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-02-11.
  • Attempting to verify the code for Arduino IDE for Kralyn3d's battery bank
    4 projects | /r/arduino | 11 Feb 2022
    #include // Default Arduino library #include // Analog MuxDemux library: https://github.com/ajfisher/arduino-analog-multiplexer #include // X9C digital potentiometel library: https://github.com/philbowles/Arduino-X9C // General pin declarations int batteryTempRAW; int chargingTempRAW; int caseTempRAW; int moduleTempRAW; int moduleConnectRAW; int batteryVoltageRAW; int inputVoltageRAW; int powerbankAmpRAW; int chargingAmpRAW; // X9C digital potentiometer definitions #define X9C_INC 2 // X9C INC pin #define X9C_UD 3 // X9C UD pin #define X9C_CS 4 // X9C CS pin X9C pot; // Default initialization of X9C digital pot instance // Analog multiplexer definitions // Either use admux::Mux to access the Mux class definition from Mux.h, or // import the associated namespace of Mux.h // to make the class Mux available without having to add 'admux' in front of it via: // // using namespace admux; // Mux inMux(...); admux::Mux inMux( admux::Pin(A7, INPUT, admux::PinType::Analog), admux::Pinset(5, 6, 7)); // Alternative (equally valid) definition to approximate the original code more closely: // using namespace admux; // Mux inMux(A7, INPUT, Pintype::Analog, 5, 6, 7); // using namespace admux; // Mux inMux(Pin(A7, INPUT, PinType::Analog), Pinset(5, 6, 7)); // General Functions section // Test function for X9C pot functionality in loop void test_X9C() { // Try two random variables, 10 and 20: pot.setPot(10); delay(500); pot.setPot(20); delay(500); // Try max, min value of pot pot.setPotMax(); delay(500); pot.setPotMin(); delay(500); } // Test function to read fictional sensors for Mux inMux void readSensors() { batteryTempRAW = inMux.read(4); // Read overall powerbank power consumption chargingTempRAW = inMux.read(6); // Read module power consumptionn caseTempRAW = inMux.read(5); // Read USB & wireless charging power consumption moduleTempRAW = inMux.read(7); // Read battery temp raw batteryVoltageRAW = inMux.read(0); // Read charging circuit temp inputVoltageRAW = inMux.read(3); // Read battery voltage powerbankAmpRAW = inMux.read(2); // Read charging input voltage chargingAmpRAW = inMux.read(1); // Check if module 1 is connected moduleConnectRAW = analogRead(A6); // Read module connect status } // Setup, Loop section void setup() { // Initialize serial at 9600 baud Serial.begin(9600); // Pinmode definitions // Pinmode(PIN, OUTPUT); ... // Initialize X9C potentiometer pot.begin(X9C_CS, X9C_INC, X9C_UD); } void loop() { // Check if X9C digital pot functionality compiles test_X9C(); // Check if Mux inMux tomfoolery compiles readSensors(); // 1s pause after each loop delay(1000); }

Stats

Basic arduino-analog-multiplexer repo stats
1
34
10.0
about 7 years ago

ajfisher/arduino-analog-multiplexer is an open source project licensed under BSD 3-clause "New" or "Revised" License which is an OSI approved license.

The primary programming language of arduino-analog-multiplexer is C++.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com