nanoFramework.Iot.Device.Ds1302
1.0.973
Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Ds1302 --version 1.0.973
NuGet\Install-Package nanoFramework.Iot.Device.Ds1302 -Version 1.0.973
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.Ds1302" Version="1.0.973" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Ds1302" Version="1.0.973" />
<PackageReference Include="nanoFramework.Iot.Device.Ds1302" />
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.Ds1302 --version 1.0.973
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Ds1302, 1.0.973"
#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.Ds1302@1.0.973
#: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.Ds1302&version=1.0.973
#tool nuget:?package=nanoFramework.Iot.Device.Ds1302&version=1.0.973
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DS1302 - Realtime Clock
The DS1302 serial real-time clock (RTC) is a lowpower, full binary-coded decimal (BCD) clock/calendar.
Sensor Image
Usage
Connect sensor to the microcontroller.
static void GetTimeFromDs1302()
{
GpioController controller = new GpioController(PinNumberingScheme.Logical);
using Ds1302 rtc = new(13, 12, 14, controller);
if (rtc.IsHalted())
{
Console.WriteLine("RTC is halted!");
}
else
{
rtc.Halt();
Console.WriteLine("RTC was halted now!");
}
var currentTime = new DateTime(2022, 8, 5, 18, 31, 0);
Console.WriteLine(currentTime.ToString());
rtc.DateTime = currentTime;
while (true)
{
// read time
DateTime dt = rtc.DateTime;
Console.WriteLine(dt.ToString("yyyy/MM/dd HH:mm:ss"));
Thread.Sleep(5000);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- nanoFramework.CoreLibrary (>= 1.17.11)
- nanoFramework.Iot.Device.Common.NumberHelper (>= 1.2.862)
- nanoFramework.Runtime.Events (>= 1.11.39)
- nanoFramework.System.Device.Gpio (>= 1.1.64)
- nanoFramework.System.Device.Model (>= 1.2.862)
- nanoFramework.System.Diagnostics.Stopwatch (>= 1.2.862)
- nanoFramework.System.Runtime.Native (>= 1.5.4)
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 |
|---|---|---|
| 2.0.0-preview.121 | 42 | 8/31/2026 |
| 2.0.0-preview.109 | 61 | 7/13/2026 |
| 2.0.0-preview.94 | 71 | 6/22/2026 |
| 2.0.0-preview.85 | 66 | 6/1/2026 |
| 2.0.0-preview.80 | 69 | 5/27/2026 |
| 2.0.0-preview.62 | 80 | 5/13/2026 |
| 2.0.0-preview.49 | 64 | 5/4/2026 |
| 2.0.0-preview.45 | 72 | 4/29/2026 |
| 2.0.0-preview.37 | 76 | 4/22/2026 |
| 2.0.0-preview.32 | 66 | 4/20/2026 |
| 2.0.0-preview.16 | 79 | 3/10/2026 |
| 1.0.973 | 44 | 8/31/2026 |
| 1.0.960 | 110 | 8/3/2026 |
| 1.0.949 | 112 | 7/13/2026 |
| 1.0.935 | 111 | 7/1/2026 |
| 1.0.924 | 123 | 6/22/2026 |
| 1.0.864 | 336 | 11/10/2025 |
| 1.0.840 | 276 | 10/2/2025 |
| 1.0.802 | 344 | 4/2/2025 |
| 1.0.797 | 311 | 4/2/2025 |
Loading failed