nanoFramework.Iot.Device.Rtc
1.2.907
Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Rtc --version 1.2.907
NuGet\Install-Package nanoFramework.Iot.Device.Rtc -Version 1.2.907
<PackageReference Include="nanoFramework.Iot.Device.Rtc" Version="1.2.907" />
<PackageVersion Include="nanoFramework.Iot.Device.Rtc" Version="1.2.907" />
<PackageReference Include="nanoFramework.Iot.Device.Rtc" />
paket add nanoFramework.Iot.Device.Rtc --version 1.2.907
#r "nuget: nanoFramework.Iot.Device.Rtc, 1.2.907"
#:package nanoFramework.Iot.Device.Rtc@1.2.907
#addin nuget:?package=nanoFramework.Iot.Device.Rtc&version=1.2.907
#tool nuget:?package=nanoFramework.Iot.Device.Rtc&version=1.2.907
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 is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.17.11)
- nanoFramework.Iot.Device.Common.NumberHelper (>= 1.2.862)
- nanoFramework.System.Device.I2c (>= 1.1.29)
- UnitsNet.nanoFramework.Temperature (>= 5.75.0)
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
:package: Board support package for M5Stack, M5StickC and M5StickCPlus for .NET nanoFramework
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.907 | 812 | 10/2/2025 |
| 1.2.889 | 473 | 7/28/2025 |
| 1.2.869 | 1,028 | 4/2/2025 |
| 1.2.864 | 456 | 4/2/2025 |
| 1.2.852 | 734 | 3/11/2025 |
| 1.2.846 | 498 | 3/10/2025 |
| 1.2.822 | 1,682 | 2/26/2025 |
| 1.2.775 | 1,899 | 2/4/2025 |
| 1.2.772 | 238 | 2/4/2025 |
| 1.2.755 | 822 | 1/31/2025 |
| 1.2.743 | 531 | 1/20/2025 |
| 1.2.737 | 213 | 1/13/2025 |
| 1.2.718 | 493 | 12/30/2024 |
| 1.2.696 | 694 | 12/16/2024 |
| 1.2.673 | 1,206 | 10/23/2024 |
| 1.2.656 | 1,328 | 10/3/2024 |
| 1.2.639 | 968 | 9/6/2024 |
| 1.2.631 | 471 | 8/28/2024 |
| 1.2.613 | 930 | 8/9/2024 |
| 1.2.601 | 433 | 7/26/2024 |
| 1.2.590 | 602 | 7/17/2024 |
| 1.2.573 | 943 | 6/19/2024 |
| 1.2.570 | 252 | 6/14/2024 |
| 1.2.536 | 1,332 | 4/15/2024 |
| 1.2.514 | 1,040 | 3/22/2024 |
| 1.2.506 | 529 | 3/5/2024 |
| 1.2.494 | 481 | 2/28/2024 |
| 1.2.478 | 597 | 1/26/2024 |
| 1.2.462 | 756 | 1/5/2024 |
| 1.2.458 | 314 | 12/20/2023 |
| 1.2.436 | 918 | 11/10/2023 |
| 1.2.416 | 665 | 11/8/2023 |
| 1.2.403 | 754 | 10/6/2023 |
| 1.2.396 | 567 | 9/27/2023 |
| 1.2.384 | 620 | 9/6/2023 |
| 1.2.378 | 871 | 8/16/2023 |
| 1.2.369 | 724 | 8/2/2023 |
| 1.2.363 | 534 | 7/28/2023 |
| 1.2.357 | 641 | 7/19/2023 |
| 1.2.354 | 621 | 7/14/2023 |
| 1.2.345 | 1,018 | 6/21/2023 |
| 1.2.341 | 634 | 6/14/2023 |
| 1.2.337 | 642 | 6/7/2023 |
| 1.2.335 | 310 | 6/2/2023 |
| 1.2.329 | 1,007 | 5/26/2023 |
| 1.2.313 | 982 | 5/12/2023 |
| 1.2.302 | 755 | 5/10/2023 |
| 1.2.297 | 724 | 5/3/2023 |
| 1.2.273 | 2,460 | 3/17/2023 |
| 1.2.267 | 1,408 | 3/10/2023 |
| 1.2.263 | 1,380 | 3/8/2023 |
| 1.2.259 | 1,431 | 2/27/2023 |
| 1.2.256 | 1,032 | 2/24/2023 |
| 1.2.253 | 1,022 | 2/22/2023 |
| 1.2.222 | 2,453 | 1/9/2023 |
| 1.2.212 | 3,218 | 1/5/2023 |
| 1.2.208 | 585 | 1/3/2023 |
| 1.2.203 | 1,640 | 12/28/2022 |
| 1.2.153 | 4,410 | 11/5/2022 |
| 1.2.141 | 4,326 | 10/25/2022 |
| 1.2.125 | 1,800 | 10/12/2022 |
| 1.2.87 | 11,063 | 9/15/2022 |
| 1.2.68 | 2,912 | 9/5/2022 |
| 1.2.63 | 1,742 | 9/3/2022 |
| 1.2.47 | 1,866 | 8/15/2022 |
| 1.2.40 | 2,112 | 8/6/2022 |
| 1.2.38 | 1,839 | 8/5/2022 |
| 1.2.28 | 5,207 | 8/1/2022 |
| 1.2.13 | 4,204 | 7/24/2022 |
| 1.2.10 | 1,895 | 7/23/2022 |
| 1.1.142.3202 | 4,400 | 7/7/2022 |
| 1.1.133.52556 | 5,470 | 6/30/2022 |
| 1.1.121.35854 | 4,170 | 6/26/2022 |
| 1.1.116.8772 | 3,039 | 6/24/2022 |
| 1.1.113.2032 | 632 | 6/23/2022 |
| 1.1.102.51394 | 3,118 | 6/15/2022 |
| 1.1.99.36719 | 1,824 | 6/14/2022 |
| 1.1.72.29765 | 9,665 | 5/31/2022 |
| 1.1.61.27737 | 4,492 | 5/25/2022 |
| 1.1.58.10097 | 1,624 | 5/23/2022 |
| 1.1.54.28879 | 1,584 | 5/23/2022 |
| 1.1.40 | 4,475 | 5/5/2022 |
| 1.1.3 | 13,732 | 4/15/2022 |
| 1.1.1 | 621 | 4/14/2022 |
| 1.0.303 | 1,627 | 4/12/2022 |
| 1.0.302 | 4,971 | 3/31/2022 |
| 1.0.288-preview.114 | 283 | 3/25/2022 |
| 1.0.288-preview.113 | 239 | 3/25/2022 |
| 1.0.288-preview.112 | 245 | 3/25/2022 |
| 1.0.288-preview.103 | 253 | 3/21/2022 |
| 1.0.288-preview.100 | 252 | 3/19/2022 |
| 1.0.288-preview.96 | 271 | 3/16/2022 |
| 1.0.288-preview.86 | 318 | 3/8/2022 |
| 1.0.288-preview.77 | 299 | 2/27/2022 |
| 1.0.288-preview.75 | 247 | 2/26/2022 |
| 1.0.288-preview.69 | 261 | 2/18/2022 |
| 1.0.288-preview.63 | 268 | 2/16/2022 |
| 1.0.288-preview.61 | 277 | 2/12/2022 |
| 1.0.288-preview.58 | 253 | 2/10/2022 |
| 1.0.288-preview.53 | 268 | 2/9/2022 |
| 1.0.288-preview.41 | 299 | 1/31/2022 |
| 1.0.288-preview.22 | 390 | 1/27/2022 |
| 1.0.288-preview.20 | 291 | 1/27/2022 |
| 1.0.288-preview.18 | 279 | 1/27/2022 |
| 1.0.288-preview.5 | 289 | 1/24/2022 |
| 1.0.272 | 772 | 1/10/2022 |
| 1.0.260 | 1,192 | 12/10/2021 |
| 1.0.259 | 534 | 12/9/2021 |
| 1.0.258 | 477 | 12/7/2021 |
| 1.0.225 | 679 | 10/22/2021 |
| 1.0.165 | 581 | 9/10/2021 |
| 1.0.157 | 552 | 9/4/2021 |
| 1.0.155 | 524 | 8/31/2021 |
| 1.0.153 | 526 | 8/14/2021 |
| 1.0.151 | 540 | 8/6/2021 |
| 1.0.146 | 530 | 7/22/2021 |
| 1.0.136 | 621 | 7/17/2021 |
| 1.0.134 | 345 | 7/15/2021 |
| 1.0.133 | 327 | 7/14/2021 |
| 1.0.130 | 351 | 7/6/2021 |
| 1.0.129 | 310 | 7/6/2021 |
| 1.0.127 | 314 | 7/5/2021 |
| 1.0.125 | 347 | 7/5/2021 |
| 1.0.122 | 351 | 6/30/2021 |
| 1.0.121 | 335 | 6/29/2021 |
| 1.0.119 | 366 | 6/28/2021 |
| 1.0.111 | 322 | 6/14/2021 |
| 1.0.105 | 420 | 5/29/2021 |
| 1.0.104 | 406 | 5/29/2021 |
| 1.0.97 | 309 | 5/28/2021 |
| 1.0.67 | 340 | 5/26/2021 |