Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for UART control mode for a02yyuw distance sensor #976

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

jamieboyd
Copy link

Added support for UART control mode for a02yyuw distance sensor. This involved sending a byte to the device before trying to read it. Added an optional parameter to constructors to choose between auto and control mode

/// <summary>
/// Constant for output mode UART Auto
/// </summary>
public const byte MODE_UART_AUTO = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both const values are set to the same value of 1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the second constant = 2.

@@ -2,19 +2,31 @@

**A02yyuw serial ultrasonic distance sensor**

The **A02yyuw** library is included in the **Meadow.Foundation.Sensors.Distance.A02yyuw** nuget package and is designed for the [Wilderness Labs](www.wildernesslabs.co) Meadow .NET IoT platform.
### Pinout for Sensor:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These readme files are auto-generated but I'll grab this text and add it to our docs - thx!

@@ -8,7 +10,12 @@
namespace A02yyuw_Sample
{
// Change F7FeatherV2 to F7FeatherV1 for V1.x boards
#if DEVICE_FEATHER // Feather: Change F7FeatherV2 to F7FeatherV1 for V1.x boards
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting idea, we should think about something like this and apply it to all samples in the repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a cleaner pattern for this that doesn't require compiler directives. See this as an example:

@@ -9,7 +9,26 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes should be removed - we keep the develop branch using local refrences and main uses nugets

@@ -22,6 +22,13 @@
<ItemGroup>
<None Include=".\Readme.md" Pack="true" PackagePath="" />
<None Include="..\..\..\icon.png" Pack="true" PackagePath="" />
<ProjectReference Include="..\..\..\Meadow.Foundation.Core\Meadow.Foundation.Core.csproj" />
</ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert to the project reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants