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

Fixing URL in documentation #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ This project is a sample for you to learn how to combine Microsoft Azure IoT Edg

## Content

1. [How to Create an Aotunomouse Drone Module on IoT Edge](doc/HowtoCreateAnAotunomouseDroneModuleonIoTEdge.md)
1. [How to Create an Aotunomouse Drone Module on IoT Edge](doc/HowToCreateAnAotunomouseDroneModuleOnIoTEdge.md)
2. [How to Use an Azure Blob Storage on IoT Edge](doc/HowToUseAzureBlobStorage.md)
3. [How To Use Azure Custom Visi on Service](doc/HowToUseAzureCustomVisionService.md)
3. [How To Use Azure Custom Vision on Service](doc/HowToUseAzureCustomVisionService.md)

[1]:https://github.com/dji-sdk/Windows-SDK
[2]:https://docs.microsoft.com/en-us/azure/iot-edge/quickstart
Expand Down
66 changes: 33 additions & 33 deletions doc/HowToUseAzureBlobStorage.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
# How to Use an Azure Blob Storage on IoT Edge
# How to Use an Azure Blob Storage on IoT Edge

## Quickstarts

#### Introduction Blob Storage
#### Introduction Blob Storage

Azure IoT Edge moves cloud analytics and custom business logic to devices that reduce bandwidth costs.Azure Blob Storage on IoT Edge enables Edge-local applications that use Azure Storage SDK to alternatively store the data locally on an Edge-local blob store. This module allows you to configure it to automatically upload the data from edge to Azure, and provides support for intermittent internet connectivity.[See Azure Blob Storage on IoT Edge](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/marketplace_iot.edge-azure-blob-storage?tab=Overview)

This session is Azure Blob Storage store your Drone capured image on IoT Edge.

## How to Do
## How to Do

* Step1: [Deployment Azure Blob Storage on IoT Edge.](../HowToUseAzureBlobStorage.md#deployment-azure-blob-storage-module-on-iot-edge)
* Step1: [Deployment Azure Blob Storage on IoT Edge.](../HowToUseAzureBlobStorage.md#deployment-azure-blob-storage-module-on-iot-edge)

* Step2: [Use Azure Blob Storage on IoT Edge to Store your data.](../HowToUseAzureBlobStorage.md#use-azure-blob-storage-module-store-your-data)

## Deployment Azure Blob Storage on IoT Edge.

#### Deploy blob storage to your device
#### Deploy blob storage to your device

Use the Azure portal to deploy Azure blob Storage on IoT Edge.[The other ways can see here](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-store-data-blob#visual-studio-code-templates).
Use the Azure portal to deploy Azure blob Storage on IoT Edge.[The other ways can see here](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-store-data-blob#visual-studio-code-templates).

The Azure Marketplace provides IoT Edge modules that can be deployed directly to your IoT Edge devices, including Azure Blob Storage on IoT Edge. Follow these steps to deploy the module from the Azure portal.

**1.** In the [Azure portal](https://ms.portal.azure.com/#home), search for "Azure Blob Storage on IoT Edge". And **select** the search result from the Marketplace.

![BlobStorage_Markerplace](ReadMeImages/BlobStorage_Markerplace.png)

**2.** Choose an IoT Edge device to receive this module. On the Target Devices for IoT Edge Module page, provide the following information:
**2.** Choose an IoT Edge device to receive this module. On the Target Devices for IoT Edge Module page, provide the following information:

* Select the **Subscription** that contains the IoT hub you're using.
* Select your **IoT Hub**.
* Select **Find Device** to choose from a list of IoT Edge devices in your IoT hub.
* Select **Create**.

**3.** In the **Add Modules** step of the set modules wizard, notice that the **AzureBlobStorageonIoTEdge** module is already listed under **Deployment Modules**.
**3.** In the **Add Modules** step of the set modules wizard, notice that the **AzureBlobStorageonIoTEdge** module is already listed under **Deployment Modules**.

**4.** On the **IoT Edge** custom modules page, update the Azure Blob Storage on IoT Edge module with the following steps:
**4.** On the **IoT Edge** custom modules page, update the Azure Blob Storage on IoT Edge module with the following steps:

* Change the module **Name** to be lowercase.
* The default **Container Create Options** the port bindings that your container needs, add your storage account information and a bind for the storage directory on your device. Overwrite the JSON in the portal with the JSON below:
* The default **Container Create Options** the port bindings that your container needs, add your storage account information and a bind for the storage directory on your device. Overwrite the JSON in the portal with the JSON below:

```json
{
Expand Down Expand Up @@ -70,42 +70,42 @@ The image for after updating Json:

![BlobStorage_Updatejson](ReadMeImages/BlobStorage_UpdateJson.png)

* Select **Save**.
* Select **Save**.

**5.** Select **Next**;and in the **Specify Routes** step of the wizard, select **Next**;In the **Review Deployment** step of the wizard, select **Submit**.

**6.** Return to the **IoT Edge** page,select the IoT Edge device that open its details.

**7.** Check to see your moduls that are setting up and runnuing with the follow command.
**7.** Check to see your moduls that are setting up and runnuing with the follow command.

```
iotedge list
```
```

![BlobStorage_IoTEdgelist](ReadMeImages/BlobStorage_IoTEdgeList.png)
![BlobStorage_IoTEdgelist](ReadMeImages/BlobStorage_IoTEdgeList.png)

#### Connect to your blob storage module
#### Connect to your blob storage module

Use the account name and account key that you configured for your module to access the blob storage on your IoT Edge device.
Deployed on the edge device where "Azure Blob Storage on IoT Edge" is running.
Create a connection string for blob storage endpoint.
Create a connection string for blob storage endpoint.

* The **ConnectionString** is:

```
DefaultEndpointsProtocol=https;BlobEndpoint=<myBlobEndpoint>;AccountName=<myAccountName>;AccountKey=<myAccountKey>
```
```

```
DefaultEndpointsProtocol=[http|https];
BlobEndpoint=myBlobEndpoint;
AccountName=myAccountName;
AccountKey=myAccountKey
```
```

* the blob endpoint is:
* the blob endpoint is:

**http://_*your device IP*_:11002/_*your account name*_**.
**http://_*your device IP*_:11002/_*your account name*_**.

[More details of blob endpoint](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-store-data-blob#connect-to-your-blob-storage-module)

Expand All @@ -118,9 +118,9 @@ use git to download a copy of the application, please click [here](../DJIUWPSamp

#### Initiate Blob Storage

##### Try parsing the connection string
##### Try parsing the connection string

Copy your connection string and replace it the value of storageConnectionString
Copy your connection string and replace it the value of storageConnectionString

```C#
string StorageAcount = "<your acount >";
Expand Down Expand Up @@ -148,9 +148,9 @@ else
}
```

More details in [FPVPage.xaml.cs](https://github.com/LiangJy123/DJI-IotEdge/blob/master/DJIUWPSampleCode/DJIWindowsSDKSample/FPV/FPVPage.xaml.cs).
More details in [FPVPage.xaml.cs](https://github.com/dji-sdk/DJI-IotEdge/blob/master/DJIUWPSampleCode/DJIWindowsSDKSample/FPV/FPVPage.xaml.cs).

#### Create the container and set permissions
#### Create the container and set permissions

```C#
// Create the CloudBlobClient that represents the Blob storage endpoint for the storage account.
Expand All @@ -166,13 +166,13 @@ BlobContainerPermissions permissions = new BlobContainerPermissions
PublicAccess = BlobContainerPublicAccessType.Blob
};
await cloudBlobContainer.SetPermissionsAsync(permissions);
```
```

More details in [FPVPage.xaml.cs](../DJIUWPSampleCode_x64/DJI-IoTEdge/DJI-IoTEdge\BlobStorageOnEdge/BlobStorageOnEdge.cs).
More details in [FPVPage.xaml.cs](../DJIUWPSampleCode_x64/DJI-IoTEdge/DJI-IoTEdge\BlobStorageOnEdge/BlobStorageOnEdge.cs).

#### Store the picture to Blob storage module

##### Convert stream into byte to save the picture
##### Convert stream into byte to save the picture

```C#
using (var stream = new InMemoryRandomAccessStream())
Expand All @@ -199,25 +199,25 @@ using (var stream = new InMemoryRandomAccessStream())
Writelog(WritelogDest.storagelog, "Disconnect!" , Writelogcolor.red);
}
}
```
```

More details in [FPVPage.xaml.cs](../DJIUWPSampleCode_x64/DJI-IoTEdge/DJI-IoTEdge/BlobStorageOnEdge/BlobStorageOnEdge.cs).
More details in [FPVPage.xaml.cs](../DJIUWPSampleCode_x64/DJI-IoTEdge/DJI-IoTEdge/BlobStorageOnEdge/BlobStorageOnEdge.cs).

## Evaluate the results on UWP
## Evaluate the results on UWP

The repo provide the [sample UWP code](../DJIUWPSampleCode_x64/DJI-IoTEdge/DJI-IoTEdge) to connect DJI drone with the Azure Blob Storage on IoT Edge Device.
The repo provide the [sample UWP code](../DJIUWPSampleCode_x64/DJI-IoTEdge/DJI-IoTEdge) to connect DJI drone with the Azure Blob Storage on IoT Edge Device.

Now you can connect DJI drone to the IoT Edge Device than Run the sample code.

#### Build and Run the UWP
#### Build and Run the UWP

1. Open the **DJIWindowsSDKSample.sln** with Visual Studio 2017.
2. Make sure the develop mode is **debug** and platform is **x64**.
3. **Run** the sample

![BlobStorage_update_Connected](ReadMeImages/BlobStorage_Connected.png)

## Reference
## Reference

* [Deploy your first IoT Edge module ](https://docs.microsoft.com/en-us/azure/iot-edge/quickstart)
* [Store data at the edge](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-store-data-blob#configure-auto-tiering-and-auto-expiration-via-azure-portal)
Expand Down
10 changes: 5 additions & 5 deletions doc/HowToUseAzureCustomVisionService.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ or whether a parking garage has available parking spots in a row. These insights

In this tutorial, you will learn how to

- [Build an image classifier with Custom Vision](https://github.com/LiangJy123/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#build-an-image-classifier-with-custom-vision).
- [Create an IoT Edge solution](https://github.com/LiangJy123/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#create-an-iot-edge-solution).
- [Build and deploy your IoT Edge solution](https://github.com/LiangJy123/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#build-and-deploy-your-iot-edge-solution).
- [Evaluate the result on UWP](https://github.com/LiangJy123/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#evaluate-the-results-on-uwp).
- [Send the results of the image classifier to IoT Hub](https://github.com/LiangJy123/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#send-the-results-of-image-classifier-to-iot-hub).
- [Build an image classifier with Custom Vision](https://github.com/dji-sdk/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#build-an-image-classifier-with-custom-vision).
- [Create an IoT Edge solution](https://github.com/dji-sdk/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#create-an-iot-edge-solution).
- [Build and deploy your IoT Edge solution](https://github.com/dji-sdk/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#build-and-deploy-your-iot-edge-solution).
- [Evaluate the result on UWP](https://github.com/dji-sdk/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#evaluate-the-results-on-uwp).
- [Send the results of the image classifier to IoT Hub](https://github.com/dji-sdk/DJI-IotEdge/blob/master/doc/HowToUseAzureCustomVisionService.md#send-the-results-of-image-classifier-to-iot-hub).

## Prerequisites

Expand Down