VOOZH about

URL: https://www.nuget.org/packages/nanoFramework.Iot.Device.Rtc/

⇱ NuGet Gallery | nanoFramework.Iot.Device.Rtc 1.2.952




👁 Image
nanoFramework.Iot.Device.Rtc 1.2.952

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Rtc --version 1.2.952
 
 
NuGet\Install-Package nanoFramework.Iot.Device.Rtc -Version 1.2.952
 
 
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="nanoFramework.Iot.Device.Rtc" Version="1.2.952" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Rtc" Version="1.2.952" />
 
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Rtc" />
 
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 nanoFramework.Iot.Device.Rtc --version 1.2.952
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Rtc, 1.2.952"
 
 
#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 nanoFramework.Iot.Device.Rtc@1.2.952
 
 
#: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=nanoFramework.Iot.Device.Rtc&version=1.2.952
 
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Rtc&version=1.2.952
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Realtime Clock

The RTC devices supported by the project include DS1307, DS3231, PCF8563 (or compatible BM8563).

Documentation

Board

Usage

Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);

For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.

Hardware Required

  • DS1307/DS3231/PCF8563/BM8563
  • Male/Female Jumper Wires
using System.Device.I2c;
using Iot.Device.Rtc;
using nanoFramework.Hardware.Esp32;

// The I2C pins 21 and 22 in the sample below are ESP32 specific and may differ from other platforms.
// Please double check your device datasheet.
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);

I2cConnectionSettings settings = new I2cConnectionSettings(1, Pcf8563.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);

using (Pcf8563 rtc = new Pcf8563(device))
{
 // set Pcf8563 dateTime
 // rtc.DateTime = GetDateTimeFromInternet();
 rtc.DateTime = new DateTime(2021, 9, 8, 10, 11, 12);
 
 while (true)
 {
 // read time
 DateTime dt = rtc.DateTime;
 
 // output the current time
 Debug.WriteLine($"Time: {dt.ToString("yyyy/MM/dd HH:mm:ss")}");
 
 // wait for a second
 Thread.Sleep(1000);
 }
}

Result

Product Versions Compatible and additional computed target framework versions.
.NET Framework net net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on nanoFramework.Iot.Device.Rtc:

Package Downloads
nanoFramework.M5Core2

This package includes the nanoFramework.M5Core2 assembly for .NET nanoFramework C# projects.

nanoFramework.M5StickC

This package includes the nanoFramework.M5StickC assembly for .NET nanoFramework C# projects.

nanoFramework.M5StickCPlus

This package includes the nanoFramework.M5StickCPlus assembly for .NET nanoFramework C# projects.

nanoFramework.Tough

This package includes the nanoFramework.Tough assembly for .NET nanoFramework C# projects.

nanoFramework.CoreInk

This package includes the nanoFramework.CoreInk assembly for .NET nanoFramework C# projects.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on nanoFramework.Iot.Device.Rtc:

Repository Stars
nanoframework/nanoFramework.M5Stack
📦 Board support package for M5Stack, M5StickC and M5StickCPlus for .NET nanoFramework
Version Downloads Last Updated
2.0.0-preview.85 66 6/1/2026
2.0.0-preview.80 63 5/27/2026
2.0.0-preview.73 101 5/20/2026
2.0.0-preview.62 73 5/13/2026
2.0.0-preview.45 98 4/29/2026
2.0.0-preview.32 86 4/20/2026
2.0.0-preview.16 95 3/10/2026
1.2.952 645 3/4/2026
1.2.907 1,449 10/2/2025
1.2.889 624 7/28/2025
1.2.869 1,116 4/2/2025
1.2.864 537 4/2/2025
1.2.852 816 3/11/2025
1.2.846 592 3/10/2025
1.2.822 1,774 2/26/2025
1.2.775 1,986 2/4/2025
1.2.772 327 2/4/2025
1.2.755 905 1/31/2025
1.2.743 626 1/20/2025
1.2.737 310 1/13/2025
Loading failed