Fendel.IoT 3.1.3

dotnet add package Fendel.IoT --version 3.1.3
                    
NuGet\Install-Package Fendel.IoT -Version 3.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fendel.IoT" Version="3.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fendel.IoT" Version="3.1.3" />
                    
Directory.Packages.props
<PackageReference Include="Fendel.IoT" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fendel.IoT --version 3.1.3
                    
#r "nuget: Fendel.IoT, 3.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Fendel.IoT@3.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fendel.IoT&version=3.1.3
                    
Install as a Cake Addin
#tool nuget:?package=Fendel.IoT&version=3.1.3
                    
Install as a Cake Tool

.NET IoT drivers library

This library contains a collection of drivers for various IoT devices. This library is a personal project created while experimenting with .NET IoT. It currently includes drivers for the Banana Pi BPI-M2+ GPIO and the TM1638 Button/LED Module. Please note that some features may be missing, but these may be added in the future.

Features

The library currently provides drivers for the following devices:

  • Banana Pi BPI-M2+ GPIO Driver: This driver allows you to interact with the GPIO pins on the Banana Pi BPI-M2+ board.

  • TM1638 Button/LED Module Driver: Use this driver to control the TM1638 Button/LED Module, which combines buttons and LEDs for input and output.

Please note that additional drivers and features may be added to the library in the future.

Usage

BpiM2PBoardDriver

Use the default constructor to create an instance of BpiM2PBoardDriver.

Example:

var driver = new BpiM2PBoardDriver();	// create an instance of the driver

using GpioController controller = new(
            PinNumberingScheme.Board,
            driver	// use the driver
	);					
	

TM1638

This driver uses bit banging for the SPI communication. This means you can use any GPIO pins.

The usage is described by the following examples:

using var tm1 = new TM1638(
	gpioController: controller,	// gpio controller related with the pins
	dataInputOutputPin: 7,	// data input output pin
	chipSelectPin: 3,	// chip select pin
	clockInputPin: 5,	// clock pin
	shouldDispose: true	// optional, true to dispose the gpio controller
	);
	
using var tm2 = new TM1638(
	dataInputOutputPin: 7,	// data input output pin
	chipSelectPin: 3,	// chip select pin
	clockInputPin: 5,	// clock pin	
	pinNumberingScheme: PinNumberingScheme.Board	//optional, pin numbering scheme
	driver: driver	// optional, the driver that manages all of the pin operations for the controller
	);	

// activate the light feature
tm2.AcivateLight(
	brightness: Brightness.High // optional, set the brightness
);	

// deactivate the light feature
tm2.DeacivateLight();

tm2.SwitchLedOn(
	LedPosition.Led1 // position of the LED
	);

tm2.SwitchLedOff(
	LedPosition.Led1 // position of the LED
	);	

tm2.SetDisplay(
	DisplayPosition.Display1, // position of the segment display
	DisplayCharacter.UppercaseC	// segment character 
	);

tm2.Clear()	

You can also create custom segment characters. See the following example:

class MyCharacter : DisplayCharacter
{
    protected override Segment Segment {get;} =
        Segment.A |
        Segment.F |
        Segment.C |
        Segment.D;
}

In the example above the segment items activate the segments as they are assigned in this picture.

License

Licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.3 264 1/5/2024
3.1.1 177 1/5/2024
3.0.1 251 11/7/2023