nanoFramework.Iot.Device.Ds1302
1.0.606
Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Ds1302 --version 1.0.606
NuGet\Install-Package nanoFramework.Iot.Device.Ds1302 -Version 1.0.606
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.606" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.Ds1302 --version 1.0.606
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Ds1302, 1.0.606"
#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.
// Install nanoFramework.Iot.Device.Ds1302 as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Ds1302&version=1.0.606 // Install nanoFramework.Iot.Device.Ds1302 as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Ds1302&version=1.0.606
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.15.5)
- nanoFramework.Iot.Device.Common.NumberHelper (>= 1.2.670)
- nanoFramework.Runtime.Events (>= 1.11.18)
- nanoFramework.System.Device.Gpio (>= 1.1.41)
- nanoFramework.System.Device.Model (>= 1.2.670)
- nanoFramework.System.Diagnostics.Stopwatch (>= 1.2.670)
- 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 |
---|---|---|
1.0.606 | 76 | 10/23/2024 |
1.0.595 | 82 | 10/11/2024 |
1.0.564 | 99 | 8/28/2024 |
1.0.523 | 96 | 7/17/2024 |
1.0.503 | 109 | 6/14/2024 |
1.0.493 | 106 | 5/29/2024 |
1.0.481 | 104 | 5/15/2024 |
1.0.369 | 237 | 11/10/2023 |
1.0.349 | 119 | 11/8/2023 |
1.0.262 | 146 | 5/26/2023 |
1.0.246 | 130 | 5/12/2023 |
1.0.230 | 154 | 5/3/2023 |
1.0.150 | 303 | 1/6/2023 |
1.0.145 | 290 | 1/5/2023 |
1.0.136 | 317 | 12/28/2022 |
1.0.92 | 355 | 11/14/2022 |
1.0.86 | 348 | 11/5/2022 |
1.0.74 | 384 | 10/25/2022 |
1.0.55 | 442 | 10/12/2022 |
1.0.47 | 404 | 10/8/2022 |
1.0.28 | 423 | 9/22/2022 |
1.0.20 | 471 | 9/15/2022 |
1.0.6 | 409 | 9/8/2022 |
1.0.1 | 414 | 9/5/2022 |