Meadow.Foundation.RTCs.Ab0805
2.4.0.4-beta
See the version list below for details.
dotnet add package Meadow.Foundation.RTCs.Ab0805 --version 2.4.0.4-beta
NuGet\Install-Package Meadow.Foundation.RTCs.Ab0805 -Version 2.4.0.4-beta
<PackageReference Include="Meadow.Foundation.RTCs.Ab0805" Version="2.4.0.4-beta" />
<PackageVersion Include="Meadow.Foundation.RTCs.Ab0805" Version="2.4.0.4-beta" />
<PackageReference Include="Meadow.Foundation.RTCs.Ab0805" />
paket add Meadow.Foundation.RTCs.Ab0805 --version 2.4.0.4-beta
#r "nuget: Meadow.Foundation.RTCs.Ab0805, 2.4.0.4-beta"
#:package Meadow.Foundation.RTCs.Ab0805@2.4.0.4-beta
#addin nuget:?package=Meadow.Foundation.RTCs.Ab0805&version=2.4.0.4-beta&prerelease
#tool nuget:?package=Meadow.Foundation.RTCs.Ab0805&version=2.4.0.4-beta&prerelease
Meadow.Foundation.RTCs.Ab0805
Ab0805 I2C real time clock
The Ab0805 library is included in the Meadow.Foundation.RTCs.Ab0805 nuget package and is designed for the Wilderness Labs Meadow .NET IoT platform.
This driver is part of the Meadow.Foundation peripherals library, an open-source repository of drivers and libraries that streamline and simplify adding hardware to your C# .NET Meadow IoT applications.
For more information on developing for Meadow, visit developer.wildernesslabs.co.
To view all Wilderness Labs open-source projects, including samples, visit github.com/wildernesslabs.
Installation
You can install the library from within Visual studio using the the NuGet Package Manager or from the command line using the .NET CLI:
dotnet add package Meadow.Foundation.RTCs.Ab0805
Usage
private Ab0805 rtc;
public override Task Initialize()
{
Resolver.Log.Info("Initializing...");
rtc = new Ab0805(Device.CreateI2cBus());
return base.Initialize();
}
public override async Task Run()
{
// Test basic RTC functionality
await TestBasicRTC();
// Test countdown timers
await TestCountdownTimers();
}
private async Task TestBasicRTC()
{
Resolver.Log.Info("=== Testing Basic RTC Functionality ===");
var running = rtc.IsRunning;
Resolver.Log.Info($"RTC {(running ? "is running" : "is not running")}");
if (!running)
{
Resolver.Log.Info("Starting RTC...");
rtc.IsRunning = true;
}
var currentTime = rtc.GetTime();
Resolver.Log.Info($"RTC current time: {currentTime:MM/dd/yy HH:mm:ss}");
// Set RTC to a known time for testing
var testTime = new DateTime(2025, 6, 15, 14, 30, 0);
Resolver.Log.Info($"Setting RTC to: {testTime:MM/dd/yy HH:mm:ss}");
rtc.SetTime(testTime);
currentTime = rtc.GetTime();
Resolver.Log.Info($"RTC time after setting: {currentTime:MM/dd/yy HH:mm:ss}");
await Task.Delay(2000);
currentTime = rtc.GetTime();
Resolver.Log.Info($"RTC time after 2 second delay: {currentTime:MM/dd/yy HH:mm:ss}");
}
private async Task TestCountdownTimers()
{
Resolver.Log.Info("\n=== Testing Countdown Timer Functionality ===");
await TestAlarm();
await Task.Delay(1000);
await TestBasicTimer();
}
private async Task TestBasicTimer()
{
Resolver.Log.Info("\n--- Test 1: Basic 2-second countdown timer ---");
rtc.ResetTimer();
Resolver.Log.Info("Starting 2-second countdown timer...");
rtc.StartTimer(5, Ab0805.DelayTimeUnit.Seconds);
var startTime = DateTime.Now;
TimeSpan elapsed;
while (rtc.HasTimerEnded == false)
{
elapsed = DateTime.Now - startTime;
Resolver.Log.Info($"Elapsed: {elapsed.TotalSeconds:F1}s");
await Task.Delay(1000);
}
elapsed = DateTime.Now - startTime;
Resolver.Log.Info($"✓ Timer completed! Interrupt fired after {elapsed.TotalSeconds:F1}s");
rtc.ResetTimer();
}
private async Task TestAlarm()
{
Resolver.Log.Info("\n--- Test 2: Alarm 5 seconds in the future ---");
DateTimeOffset alarmTime = rtc.GetTime().AddSeconds(5);
Resolver.Log.Info("Monitoring alarm...");
rtc.SetAlarm(alarmTime);
var startTime = DateTime.Now;
TimeSpan elapsed;
while (rtc.HasAlarmTriggered == false)
{
elapsed = DateTime.Now - startTime;
Resolver.Log.Info($"Elapsed: {elapsed.TotalSeconds:F1}s");
await Task.Delay(1000);
}
elapsed = DateTime.Now - startTime;
Resolver.Log.Info($"✓ Alarm triggered! Interrupt fired after {elapsed.TotalSeconds:F1}s");
await Task.Delay(5000);
rtc.ResetAlarm();
}
How to Contribute
- Found a bug? Report an issue
- Have a feature idea or driver request? Open a new feature request
- Want to contribute code? Fork the Meadow.Foundation repository and submit a pull request against the
develop
branch
Need Help?
If you have questions or need assistance, please join the Wilderness Labs community on Slack.
About Meadow
Meadow is a complete, IoT platform with defense-grade security that runs full .NET applications on embeddable microcontrollers and Linux single-board computers including Raspberry Pi and NVIDIA Jetson.
Build
Use the full .NET platform and tooling such as Visual Studio and plug-and-play hardware drivers to painlessly build IoT solutions.
Connect
Utilize native support for WiFi, Ethernet, and Cellular connectivity to send sensor data to the Cloud and remotely control your peripherals.
Deploy
Instantly deploy and manage your fleet in the cloud for OtA, health-monitoring, logs, command + control, and enterprise backend integrations.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Meadow.Foundation (>= 2.4.0.4-beta)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Meadow.Foundation.RTCs.Ab0805:
Package | Downloads |
---|---|
Meadow.Foundation.DeepSleep
Wilderness Labs I2C timer deep sleep power controller |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
2.4.0.5-beta | 0 | 9/9/2025 |
2.4.0.4-beta | 129 | 9/1/2025 |
2.4.0.3-beta | 132 | 9/1/2025 |
2.4.0.2-beta | 179 | 8/26/2025 |
2.4.0.1-beta | 132 | 8/20/2025 |
2.4.0 | 139 | 8/15/2025 |
2.3.0.3-beta | 138 | 8/12/2025 |
2.3.0.2-beta | 212 | 8/7/2025 |
2.3.0.1-beta | 504 | 7/23/2025 |
2.3.0 | 140 | 7/15/2025 |
2.2.0.10-beta | 139 | 7/8/2025 |
2.2.0.9-beta | 80 | 7/4/2025 |
2.2.0.8-beta | 138 | 7/3/2025 |
2.2.0.7-beta | 143 | 6/19/2025 |
2.2.0.6-beta | 138 | 6/18/2025 |