Skip to content

Commit

Permalink
Merge pull request #789 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Publish latest to production
  • Loading branch information
jorgedevs authored Aug 5, 2024
2 parents 278ec24 + c3f7118 commit 9c9ffae
Show file tree
Hide file tree
Showing 30 changed files with 774 additions and 510 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.user
*.userosscache
*.sln.docstates
.gitconfig

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down
686 changes: 340 additions & 346 deletions docs/Common_Files/Meadow_F7v2_Micro_Pinout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: Meadow
title: SD Card use with Core-Compute module
title: SD Card use with Core-Compute Module
subtitle: Working with an SD card on the Meadow Core-Compute Development Kit
sidebar_label: SD Card on CCM
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: Meadow
title: Get started with Meadow Core-Compute module
title: Get Started with Meadow Core-Compute Module
subtitle: "To get up and running with Meadow Core-Compute, follow these steps:"
---

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
256 changes: 256 additions & 0 deletions docs/Hardware/Reference/Meadow_Hardware/Meadow_F7/F7v2/index.md

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions docs/Hardware/Reference/Meadow_Hardware/Meadow_F7/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
layout: Meadow
title: Meadow Hardware
subtitle: Meadow System-on-Modules (SoM) boards for prototype and production.
---

The Meadow F7 is a workhorse Wi-Fi and Bluetooth enabled System-on-Module (SoM) microcontroller-based board designed for sophisticated IoT applications and is based on the STMicroelectronics STM32F7 microcontroller (MCU) with an Espressif ESP32 coprocessor.

![Photo of the Meadow F7 board.](/Common_Files/F7v2_Dev_Medium_Cropped.jpg)

The Meadow F7 is provisioned with Meadow.OS which runs full .NET Standard v2.1 applications and can be managed remotely via Meadow.Cloud with secure, over-the-air (OtA) updates, reliable push messaging, and device and application health monitoring over a Wi-Fi or ethernet (F7 Core-Compute model only) network.

## Meadow F7 Block Diagram

![Meadow F7 Block Diagram](meadowF7blockdiagram.png)

## Hardware Resources

* [F7v2 Hardware Designs GitHub Repo](https://github.com/WildernessLabs/Meadow_Hardware_Designs)
* [Meadow F7v2 Feather Development Module v2.d STEP file](https://github.com/WildernessLabs/Meadow_Hardware_Designs/blob/main/Meadow_F7v2/Feather_Dev_Module/F7CoreComputeModuleV2a.step)
* [Meadow F7v2 Core-Compute Module v2 STEP file](https://github.com/WildernessLabs/Meadow_Hardware_Designs/blob/main/Meadow_F7v2/Core-Compute_Module/F7CoreComputeModuleV2a.step)
* [Meadow EDA Symbols and Footprints Github Repo](https://github.com/WildernessLabs/Meadow_EDA_Parts)
* [Meadow Core-Compute Developer Module Repo](https://github.com/WildernessLabs/Meadow.Core-Compute.DevBreakouts)
* [Meadow Hardware Add-on Module Designs GitHub Repo](https://github.com/WildernessLabs/Hardware_Addon_Modules)



## Power
### Meadow F7 Feather

The Meadow F7 Feather development board has onboard power features not present on the embedded version, including an LDA and battery charging circuit, and is designed such that it can be powered by supplying the appropriate voltage to either the USB connector, or the 5V or 3.3V power rails.

### LiPo, LiIon Battery Charging

Supplying voltage via either the USB connector or 5V rail is effectively the same; it will output 3.3V on the 3V3 power rail, and enable the battery charging circuit, which will charge any standard 3.7V LiPo/LiIon battery.

To use a battery, you can either hook it to the JST-PH battery connector, or wire it directly to the VBAT and GND pins on the header. Both Adafruit and SparkFun have a good selection of LiPo/LiIon batteries that will work.

![JST-PH Battery Connector](jst-phBatteryConnector.png)

The battery charging circuit will supply a battery with up to 200mA of current (at up to 4.2V).

If you supply voltage only to the 3.3V power rail, the board will operate as expected, but the battery charging circuit will not be enabled and the 5V power rail will only be at 3.3V.

#### Charge Status LED

When charging, the yellow charge status LED next to the JST-PH connector will light up.

### Meadow F7 Core-Compute

Unlike the Meadow F7 Feather, the F7 Core-Compute SoM doesn’t include onboard power regulation or battery charging circuit. It must be supplied with at least 500mA of available current on the 3V3 pin.

### Power Budget

The Meadow F7 and IOs are intended to operate on a combined maximum power budget of ~500mA with 400mA reserved for onboard functionality including both MCUs, RAM, and flash. This leaves, at a minimum, 100mA for peripherals, including anything drawing power from the IOs on the board.

#### Peripheral Usage

In addition to the overall power budget, the amount of power being delivered to peripherals via the IO pins must be considered. There is both an overall maximum that the MCU can drive, as well as a per pin maximum.

On the Meadow F7, there is a 25mA per IO maximum, and a total maximum of 120mA.

For additional information on supplying and using power on the Meadow F7 boards, including using solar panels, please refer to the [Power Guide](http://developer.wildernesslabs.co/Meadow/Meadow_Basics/IO/Power/).

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/Hardware/Reference/Meadow_Hardware/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: Meadow
title: Meadow Hardware
subtitle: A place for Meadow Hardware docs to live.
---

* [Meadow F7](Meadow_F7): Information on the Meadow F7 development board, including power features, battery charging, and hardware designs.
* [Core-Compute Module](Getting_Started_Core-Compute_Module): Steps to get started with the Meadow Core-Compute module, including setup and peripheral connections.
* [Core-Compute Module SD card use](Core-Compute_SD_Card): Using an SD card with a Core-Compute module and the SD Card Reader add-on.
7 changes: 4 additions & 3 deletions docs/Hardware/Reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: Hardware
title: Hardware & Circuits Reference
---

* [Electronic Fundamentals](Electronic_Fundamentals)
* [Components](Components)
* [Algorithms](Algorithms)
* [Meadow Hardware](Meadow_Hardware): Provides documentation for Meadow hardware, including the Meadow F7 and Core-Compute modules.
* [Electronic Fundamentals](Electronic_Fundamentals): Learn basic electronics concepts like voltage, amperage, power, resistance, and capacitance.
* [Components](Components): Details common electronic components such as resistors, diodes, capacitors, and transistors.
* [Algorithms](Algorithms): Focuses on control algorithms like PID (Proportional-Integral-Derivative).
42 changes: 42 additions & 0 deletions docs/Meadow/Meadow.OS/Resolver/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
layout: Meadow
title: Service Resolver
subtitle: Accessing static services, app, and device at runtime in Meadow
sidebar_label: Resolver
---

This guide will give you an overall view of how to use the static Resolver class to access the currently running Meadow App, Device, Logger, and any registered services at runtime.

If you want to see entire API available through via the Resolver class, please look at the [Meadow Resolver API docs](/docs/api/Meadow/Meadow/Resolver/).

### Resolver.Device

`Resolver.Device` accesses the currently running [Meadow device](/docs/api/Meadow/Meadow/IMeadowDevice/), where you can access device-specific details such as capabilities and pins that are available.

### Resolver.App

`Resolver.App` accesses the currently running Meadow app, the instance of your [`App` class](/docs/api/Meadow/Meadow/App%60D%60/), where you can access your custom app properties and methods.

### Resolver.Log

`Resolver.Log` accesses the current [Meadow logger](/docs/api/Meadow/Meadow.Logging/Logger/) implementation, where you can send information with various levels of logging detail/severity. Additionally, you can also register your own logging providers. By default, Meadow will log to the console output that you can view via the `meadow listen` command from a terminal or other wired serial outputs.

Logging can be done at several levels of severity. There are methods for `Trace`, `Debug`, `Info`, `Warn`, and `Error`, which will log the provided details with that severity set. Additionally, you can use the various `{LogLevel}If` methods to log if a condition is met. For example, `Resolver.Log.ErrorIf(condition, "Error message")` will log the error message if the condition is met and returns true.

There are [several logging systems provided in the Meadow.Logging class](https://github.com/WildernessLabs/Meadow.Logging/tree/develop/Source/Meadow.Logging.LogProviders/Driver), such as logging to a file, UDP, or Meadow.Cloud. And there is a [sample app](https://github.com/WildernessLabs/Meadow.Logging/tree/develop/Source/Meadow.Logging.LogProviders/Samples) to see how these loggers can be used in your Meadow apps. From there, you can also create your own logger implementations and register them via `Resolver.Log.AddProvider(...)`. For more information, see the [Meadow.Logging API documentation](/docs/api/Meadow/Meadow.Logging/).

### Resolver services

Resolver offers properties to access several common services, such as JSON serialization, update service, sensor service, as well as a system for registering your own services for use elsewhere in your app.

`Resolver.JsonSerializer` provides access to a JSON serialization and deserialization library registered for you as part of the Meadow OS runtime setup. Currently, Meadow registers an instance of the MicroJson serialization library for JSON serialization and deserialization because of its performance capabilities in memory restricted environments like microcontrollers. From the registered serializer implementation, you can use `Resolver.JsonSerializer.Serialize(myObject)` and `Resolver.JsonSerializer.Deserialize<MyObject>(jsonString)` to serialize and deserialize objects to and from JSON strings.

`Resolver.MeadowCloudService` accesses the currently running Meadow Cloud service, which allows you to send data to Meadow.Cloud from your Meadow device.

`Resolver.CommandService` accesses the currently running command service, allowing you to handle commands sent to your Meadow device from Meadow.Cloud.

`Resolver.UpdateService` accesses the currently running [OTA update](/Meadow/Meadow.Cloud/OtA_Updates/) service, which allows you to update your Meadow device's firmware over the air from Meadow.Cloud.

`Resolver.SensorService` accesses the currently running sensor service, which provides a place to register sensors connected to your Meadow device to access them from anywhere in your app. For some platforms, like Project Lab boards, many of the onboard sensors will be registered for you already.

`Resolver.Services` is a `ServiceCollection` that contains all of the above services registered for you as well as any additional services you register yourself. You can register your own services for use elsewhere in your code (e.g., a Maple server, Avalonia, or MAUI app) by calling `Resolver.AddService<IMyService>(new MyService())`. Services are registered as singletons by default. Once registered, you can access your service from anywhere in your app by calling `Resolver.Get<IMyService>()` or `Resolver.GetOrCreate<IMyService>()`. The `Get` method will return your singleton service or `null` if it doesn't have one, while the `GetOrCreate` method will return your singleton service or create a new instance if it doesn't have one.
1 change: 1 addition & 0 deletions docs/Meadow/Meadow.OS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Meadow.OS offers a comprehensive operating system framework that includes featur
* **[File System](File_System)**
* **[Networking](Networking)**
* **[Profiler](Profiler)**
* **[Resolver](Resolver)**
* **[Real-Time Clock](RTC)**
* **[SQLite](SQLite)**
* **[Threading](Threading)**
Expand Down
6 changes: 4 additions & 2 deletions docs/Meadow/Meadow_Basics/Apps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Therefore, any public members are also available without having to cast. For ins
var name = Resolver.App.InstalledName;
```

For more detailed information, check out the [Resolver documentation](/Meadow/Meadow.OS/Resolver).

## Configure Meadow, wi-fi, and application settings

Several aspects of your Meadow hardware and application execution are handled by configuration files that you can deploy with your app. Learn more about these configuration files and options from the [Meadow Configuration details](/Meadow/Meadow.OS/Configuration).
Expand All @@ -70,7 +72,7 @@ public class MeadowApp : App<F7FeatherV2>

public override Task Initialize()
{
Console.WriteLine("Initialize hardware...");
Resolver.Log.Info("Initialize hardware...");

onboardLed = new RgbPwmLed(device: Device,
redPwmPin: Device.Pins.OnboardLedRed,
Expand All @@ -89,7 +91,7 @@ public class MeadowApp : App<F7FeatherV2>

void CycleColors(TimeSpan duration)
{
Console.WriteLine("Cycle colors...");
Resolver.Log.Info("Cycle colors...");

while (true)
{
Expand Down
66 changes: 0 additions & 66 deletions docs/Meadow/Meadow_Basics/Hardware/F7v2/index.md

This file was deleted.

Loading

0 comments on commit 9c9ffae

Please sign in to comment.