Fendel.IoT
3.1.3
dotnet add package Fendel.IoT --version 3.1.3
NuGet\Install-Package Fendel.IoT -Version 3.1.3
<PackageReference Include="Fendel.IoT" Version="3.1.3" />
<PackageVersion Include="Fendel.IoT" Version="3.1.3" />
<PackageReference Include="Fendel.IoT" />
paket add Fendel.IoT --version 3.1.3
#r "nuget: Fendel.IoT, 3.1.3"
#:package Fendel.IoT@3.1.3
#addin nuget:?package=Fendel.IoT&version=3.1.3
#tool nuget:?package=Fendel.IoT&version=3.1.3
.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 | Versions 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. |
-
net7.0
- System.Device.Gpio (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.