
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
A Node.js module for the TCA9548A I2C 8-channel Multiplexer.
Built using node v11.9.0
This is Node.js I2C module for the TCA9548A Low-Voltage 8-Channel I2C Switch/Multiplexer.
This module uses i2c-bus which should provide access with Node.js on Linux boards like the Raspberry Pi Zero, 1, 2, or 3B and +, BeagleBone, BeagleBone Black, or Intel Edison.
Since TCA9548A needs to talk directly to the I2C bus and requires access to /dev/i2c, you will typically need run Node with elevated privileges or add your user account to the i2c group: $ sudo adduser $USER i2c. On Raspberry PI, be sure to enable I2C protocol in system configuration before proceeding.
//require module
//
const TCA9548A = require('tca9548a');
//module is constructed via Class so first call a new instance
//device is automatically initialized and ready to use
//addr defaults to 0x70 and bus defaults to 1
//
const tca9548a_1 = new TCA9548A({addr: 0x70, bus: 1});
//if you have more than one TCA9548A, can call another instance
//make sure that the addr is correct!!!
//
const tca9548a_2 = new TCA9548A({addr: 0x71, bus: 1});
//as an example, if using two bme280 temp sensors (sensor1 and sensor2)
//that have the same address need to enable the specific
//multiplexer port each time you want to read from a certain device
//singlePortOn activates the port of the argument and
//disables all other ports
//argument has to be a number 0-7
//
//use a callback to ensure that the port is enabled
//before proceeding with other processing
//
//for example, sensor1 is attached to port 2 on the multiplexer
//
tca9548a_1.singlePortOn(2, doSomethingWithSensor());
//then read from sensor2 attached to port 6 on the multiplexer
//
tca9548a_1.singlePortOn(6, doSomethingWithSensor());
function doSomethingWithSensor () {
//process sensor data magic
console.log('doSomethingWithSensor called');
}
//can also enable all ports
tca9548a_1.allPortsOn();
//or disable all ports
tca9548a_1.allPortsOff();
FAQs
A Node.js module for the TCA9548A I2C 8-channel Multiplexer
We found that tca9548a demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.