![]() |
VOOZH | about |
dotnet add package Meadow.Foundation.ICs.IOExpanders.Sc16is7x2 --version 2.5.0
NuGet\Install-Package Meadow.Foundation.ICs.IOExpanders.Sc16is7x2 -Version 2.5.0
<PackageReference Include="Meadow.Foundation.ICs.IOExpanders.Sc16is7x2" Version="2.5.0" />
<PackageVersion Include="Meadow.Foundation.ICs.IOExpanders.Sc16is7x2" Version="2.5.0" />Directory.Packages.props
<PackageReference Include="Meadow.Foundation.ICs.IOExpanders.Sc16is7x2" />Project file
paket add Meadow.Foundation.ICs.IOExpanders.Sc16is7x2 --version 2.5.0
#r "nuget: Meadow.Foundation.ICs.IOExpanders.Sc16is7x2, 2.5.0"
#:package Meadow.Foundation.ICs.IOExpanders.Sc16is7x2@2.5.0
#addin nuget:?package=Meadow.Foundation.ICs.IOExpanders.Sc16is7x2&version=2.5.0Install as a Cake Addin
#tool nuget:?package=Meadow.Foundation.ICs.IOExpanders.Sc16is7x2&version=2.5.0Install as a Cake Tool
SC16IS7x2 SPI I2C family of UART expanders (SC16IS752, SC16IS762)
The Sc16is7x2 library is included in the Meadow.Foundation.ICs.IOExpanders.Sc16is7x2 nuget package and is designed for the Meadow .NET IoT platform.
This driver is part of the Meadow.Foundation peripherals library, an open-source repository of drivers and libraries that streamline and simplify adding hardware to your C# .NET Meadow IoT applications.
For more information on developing for Meadow, visit developer.wildernesslabs.co.
To view all Wilderness Labs open-source projects, including samples, visit github.com/wildernesslabs.
You can install the library from within Visual studio using the the NuGet Package Manager or from the command line using the .NET CLI:
dotnet add package Meadow.Foundation.ICs.IOExpanders.Sc16is7x2
private Sc16is752? _expander = null;
private ISerialPort? _expanderPort = null;
private ISerialPort? _nativePort = null;
private const int Rate = 9600;
public override async Task Initialize()
{
// NOTE: This sample connects PortA on the expander back to COM1 on the F7Feather
Resolver.Log.Info("Initialize...");
var address = Sc16is7x2.Addresses.Address_0x4D;
try
{
_expander = new Sc16is752(
Device.CreateI2cBus(),
new Meadow.Units.Frequency(1.8432, Meadow.Units.Frequency.UnitType.Megahertz),
address);
_expanderPort = _expander.PortA.CreateSerialPort(Rate);
_nativePort = Device.PlatformOS.GetSerialPortName("com1")?.CreateSerialPort(Rate);
}
catch (Exception ex)
{
Resolver.Log.Error($"Failed to initialize 0x{(byte)address:X2}: {ex.Message}");
await Task.Delay(1000);
}
}
public override Task Run()
{
if (_expander == null || _expanderPort == null || _nativePort == null)
{
return Task.CompletedTask;
}
Task.Run(() => PingReply(_expanderPort, _nativePort));
while (true)
{
Thread.Sleep(1000);
}
}
private async Task PingReply(ISerialPort portA, ISerialPort portB)
{
var readBuffer = new byte[64];
Resolver.Log.Info("Opening ports...");
portA.Open();
portB.Open();
var abMessage = "ping\n";
var baMessage = "reply\n";
var count = 0;
while (true)
{
try
{
// A -> B
Resolver.Log.Info($"TEST A->B");
var messageAB = Encoding.ASCII.GetBytes(abMessage);
Resolver.Log.Info($"Writing {messageAB.Length} bytes on A...");
Resolver.Log.Info($" {BitConverter.ToString(messageAB)}");
portA.Write(messageAB);
Resolver.Log.Info($"Reading on B...");
count = 0;
while (count < messageAB.Length)
{
count += portB.Read(readBuffer, count, messageAB.Length);
}
Resolver.Log.Info($"Read {count} bytes on B");
Resolver.Log.Info($" {BitConverter.ToString(readBuffer, 0, count)}");
var rxString = Encoding.ASCII.GetString(readBuffer, 0, count);
Resolver.Log.Info($"A sent: {abMessage}");
Resolver.Log.Info($"B received: {rxString}\n");
// B -> A
Resolver.Log.Info($"TEST B->A");
var messageBA = Encoding.ASCII.GetBytes(baMessage);
Resolver.Log.Info($"Responding with {messageBA.Length} bytes on B...");
Resolver.Log.Info($" {BitConverter.ToString(messageBA)}");
portB.Write(messageBA);
Resolver.Log.Info($"Reading on A...");
count = 0;
while (count < messageBA.Length)
{
count += portA.Read(readBuffer, count, messageBA.Length);
}
Resolver.Log.Info($"Read {count} bytes on A");
Resolver.Log.Info($" {BitConverter.ToString(readBuffer, 0, count)}");
rxString = Encoding.ASCII.GetString(readBuffer, 0, count);
Resolver.Log.Info($"B sent: {baMessage}");
Resolver.Log.Info($"A received: {rxString}\n");
await Task.Delay(30000);
}
catch (Exception ex)
{
Resolver.Log.Error($"Test error: {ex.Message}");
await Task.Delay(5000);
}
}
}
develop branchIf you have questions or need assistance, please join the Wilderness Labs community on Slack.
Meadow is a complete, IoT platform with defense-grade security that runs full .NET applications on embeddable microcontrollers and Linux single-board computers including Raspberry Pi and NVIDIA Jetson.
Use the full .NET platform and tooling such as Visual Studio and plug-and-play hardware drivers to painlessly build IoT solutions.
Utilize native support for WiFi, Ethernet, and Cellular connectivity to send sensor data to the Cloud and remotely control your peripherals.
Instantly deploy and manage your fleet in the cloud for OtA, health-monitoring, logs, command + control, and enterprise backend integrations.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 1 NuGet packages that depend on Meadow.Foundation.ICs.IOExpanders.Sc16is7x2:
| Package | Downloads |
|---|---|
|
Meadow.ProjectLab
Library for the Meadow ProjectLab IoT accelerator |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.5.0.12-beta | 137 | 4/25/2026 |
| 2.5.0.11-beta | 154 | 3/17/2026 |
| 2.5.0.10-beta | 152 | 3/11/2026 |
| 2.5.0.9-beta | 140 | 3/6/2026 |
| 2.5.0.8-beta | 149 | 2/28/2026 |
| 2.5.0.7-beta | 145 | 2/27/2026 |
| 2.5.0.6-beta | 148 | 2/24/2026 |
| 2.5.0.5-beta | 243 | 12/23/2025 |
| 2.5.0.4-beta | 214 | 12/20/2025 |
| 2.5.0.3-beta | 330 | 12/17/2025 |
| 2.5.0.2-beta | 484 | 12/9/2025 |
| 2.5.0.1-beta | 483 | 12/9/2025 |
| 2.5.0 | 326 | 11/24/2025 |
| 2.4.0.15-beta | 445 | 11/20/2025 |
| 2.4.0.14-beta | 192 | 11/7/2025 |
| 2.4.0.13-beta | 269 | 11/6/2025 |
| 2.4.0.12-beta | 239 | 11/5/2025 |
| 2.4.0.11-beta | 242 | 10/28/2025 |
| 2.4.0.10-beta | 219 | 10/20/2025 |
| 2.4.0.9-beta | 178 | 10/18/2025 |