SPRING SALE up to 20% OFF! (excludes trade customers)   •   FREE Standard Delivery for orders over £35 (ex VAT)
Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Knowledge Base

I2C Switch .Net Core Library

I2C Switch .Net Core Library code and demos

Created 29/07/2024 | Last Updated: 21/06/2025

YOU WILL NEED THIS BOARD

215 available
Order a I2C Switch Photo of I2C Switch

I2C Switch

4 Channel PCA9546 I2C Multiplexer for the Raspberry Pi and Single-Board Computers

£5.59 ex VAT

.Net Core Library to use with the I2C Switch Raspberry Pi development boards.

Downloading and Installing the .Net Core Libraries

Download the zip archive containing the code demos and libraries from GitHub.

I2C Switch Methods

Connect() 

Connect to the I2C device
Parameters: none
Returns: null

IsConnected() 

Check if the device is connected
Parameters: none
Returns: boolean

Dispose() 

Dispose of the active I2C device
Parameters: none
Returns: null

SwitchChannel(byte channel)

Enable the specified I2C channel and disable other channels.
Parameters: channel - 1 to 4
Returns: null

SetChannelState(byte channel, bool state)

Set the state of an individual I2C channel.
Parameters: channel - 1 to 4, state - true or false
Returns: null

GetChannelState(byte channel)

Get the state of an individual I2C channel.
Parameters: channel - 1 to 4
Returns: state - true or false

Reset()

Reset the I2C switch.
Returns: null

I2C Switch Parameters

byte Address { get; set;}

Gets or sets the I2C address for the I2C Switch bus

byte ResetPin { get; set; }

GPIO pin for resetting the I2C Switch

Also useful for your Raspberry Pi project

Temperature & Sensing

1 Wire Pi Plus

Connect dozens of 1-Wire sensors - temperature, iButtons, EEPROMs - via a single GPIO pin. Stacks directly on the 40-pin header.

£9.59 ex VAT

Analogue I/O

ADC Pi

Read up to 8 analogue inputs - perfect for pairing with your temperature sensors or other analogue-output devices.

£14.39 ex VAT

All-in-one

Expander Pi

Combines ADC, DAC, 32 GPIO ports and a real-time clock on one board. The most versatile board for complex Raspberry Pi projects.

£15.99 ex VAT

Order these Boards

All boards are designed & manufactured in the UK with RoHS-compliant components.