Skip to content

Commit

Permalink
Readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstevens committed Jan 29, 2024
1 parent 9febf49 commit 57c2667
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,58 @@ For more information on developing for Meadow, visit [developer.wildernesslabs.c

To view all Wilderness Labs open-source projects, including samples, visit [github.com/wildernesslabs](https://github.com/wildernesslabs/).

## Usage

```csharp
public class MeadowApp : App<Meadow.Windows>
{
WinFormsDisplay? _display;
MicroGraphics _graphics = default!;

public override Task Initialize()
{
_display = new WinFormsDisplay(240, 320);

_graphics = new MicroGraphics(_display)
{
CurrentFont = new Font12x20(),
Stroke = 1
};

_ = Task.Run(() =>
{
Thread.Sleep(2000);

_graphics.Clear();

_graphics.DrawTriangle(10, 30, 50, 50, 10, 50, Color.Red);
_graphics.DrawRectangle(20, 45, 40, 20, Color.Yellow, false);
_graphics.DrawCircle(50, 50, 40, Color.Blue, false);
_graphics.DrawText(5, 5, "Meadow F7", Color.White);

_graphics.Show();
});

return Task.CompletedTask;
}

public override Task Run()
{
Application.Run(_display!);

return Task.CompletedTask;
}

public static async Task Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ApplicationConfiguration.Initialize();

await MeadowOS.Start(args);
}
}
```
## How to Contribute

- **Found a bug?** [Report an issue](https://github.com/WildernessLabs/Meadow_Issues/issues)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private async Task RunToSpecificPositions()
{
Resolver.Log.Info($"Moving in increments of {increment} degrees");

await stepper.GoTo(Angle.Zero, direction, rate);
await stepper.GoTo(new Angle(0), direction, rate);
await Task.Delay(1000);

var nextPosition = 0d;
Expand Down Expand Up @@ -162,7 +162,7 @@ private async Task RunToSpecificPositions()

var nextPosition = 360d;

await stepper.GoTo(Angle.Zero, direction, rate);
await stepper.GoTo(new Angle(0), direction, rate);
await Task.Delay(1000);

while (nextPosition > 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Meadow.Foundation.Sensors.Temperature.Mcp960x

**Pct2075 I2C temperature sensor**

The **Pct2075** library is designed for the [Wilderness Labs](www.wildernesslabs.co) Meadow .NET IoT platform and is part of [Meadow.Foundation](https://developer.wildernesslabs.co/Meadow/Meadow.Foundation/).

The **Meadow.Foundation** peripherals library is an open-source repository of drivers and libraries that streamline and simplify adding hardware to your C# .NET Meadow IoT application.

For more information on developing for Meadow, visit [developer.wildernesslabs.co](http://developer.wildernesslabs.co/).

To view all Wilderness Labs open-source projects, including samples, visit [github.com/wildernesslabs](https://github.com/wildernesslabs/).

## Usage

```csharp
private Pct2075 sensor;

public override Task Initialize()
{
sensor = new Pct2075(Device.CreateI2cBus());

sensor.Updated += OnUpdated;
sensor.StartUpdating(TimeSpan.FromSeconds(1));

return base.Initialize();
}

private void OnUpdated(object sender, IChangeResult<Meadow.Units.Temperature> e)
{
Debug.WriteLine($"Temp: {e.New.Celsius:n1}C {e.New.Fahrenheit:n1}F");
}

```
## How to Contribute

- **Found a bug?** [Report an issue](https://github.com/WildernessLabs/Meadow_Issues/issues)
- Have a **feature idea or driver request?** [Open a new feature request](https://github.com/WildernessLabs/Meadow_Issues/issues)
- Want to **contribute code?** Fork the [Meadow.Foundation](https://github.com/WildernessLabs/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](http://slackinvite.wildernesslabs.co/).

0 comments on commit 57c2667

Please sign in to comment.