-
Notifications
You must be signed in to change notification settings - Fork 69
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
base: develop
Are you sure you want to change the base?
Conversation
/// <summary> | ||
/// Constant for output mode UART Auto | ||
/// </summary> | ||
public const byte MODE_UART_AUTO = 1; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
Line 10 in fb357c4
public class FeatherV1App : MeadowApp<F7FeatherV1> { } |
@@ -9,7 +9,26 @@ | |||
<AssemblyName>App</AssemblyName> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
I will reload to own directory
Added new calibration stuff
added different methods for getting updates with filtering based on analog input and temperature changes
Modified DO sensor to use interfaces properly,
DO sensor code and docs
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