Skip to content

Commit

Permalink
Merge pull request #819 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Merge to main for v2.0
  • Loading branch information
ctacke authored Jan 8, 2025
2 parents 88d8358 + 5b2d84c commit 12a53b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
13 changes: 6 additions & 7 deletions docs/Meadow/Meadow_Basics/IO/Digital/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,12 @@ _Reading_ the state of a _digital input_ is done using an implementation of the
```csharp
IDigitalInputPort CreateDigitalInputPort(
IPin pin,
InterruptMode interruptMode = InterruptMode.None,
ResistorMode resistorMode = ResistorMode.Disabled,
double debounceDuration = 0,
double glitchDuration = 0);
ResistorMode resistorMode = ResistorMode.Disabled);
```

The three most important arguments are:
The arguments are:

* **`pin`** - The pin on the device of which to configure to be a digital input.
* **`interruptMode`** - Whether or not the port should be configured to raise interrupt notifications, and what kind of change should trigger an interrupt.
* **`resistorMode`** - The `ResistorMode` specifying whether an external pull-up/pull-down resistor is used, or an internal pull-up/pull-down resistor should be configured for default state.

We'll examine debounce and glitch filtering in a moment.
Expand Down Expand Up @@ -94,7 +90,10 @@ For example, if you wanted your application to get notified when the `D03` input
// create the InputPort with interrupts enabled
var input = Device.CreateDigitalInputPort(
Device.Pins.D03,
InterruptMode.EdgeRising);
InterruptMode.EdgeRising,
ResistorMode.Disabled,
TimeSpan.FromMilliseconds(5),
TimeSpan.FromMilliseconds(5));

// add an event handler
input.Changed += (s, e) =>
Expand Down
4 changes: 2 additions & 2 deletions docs/Meadow/Release_Notes/v2/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: Meadow
sidebar_label: Meadow v1.*
title: Meadow v1.* Releases
sidebar_label: Meadow v2.*
title: Meadow v2.* Releases
subtitle: Release Notes
---

Expand Down
1 change: 1 addition & 0 deletions src/sidebars/meadowOsSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ const meadowOsSidebar = [
id: "Meadow/Release_Notes/index",
},
items: [
"Meadow/Release_Notes/v2/index",
"Meadow/Release_Notes/v1/index",
"Meadow/Release_Notes/Release-Candidates/index",
{
Expand Down

0 comments on commit 12a53b9

Please # to comment.