Skip to content

Neo117/AZ3166-connect-Azure

Repository files navigation


Getting Started Guide


Table of Contents

Introduction

AZ3166 is an IoT development kit based on EMW3166 developed by Shanghai MXCHIP Information Technology Co., Ltd. and Microsoft asia-pacific technology Co., Ltd. The development kit provides a smart hardware solution. It is compatible with Arduino with abundant peripherals and sensors. AZ3166 could be used for the development of IoT and smart hardware prototype, making it continent to verify the software and function of users. Product could connect to Azure and mobile phone fast and safely. With AZ3166, customers could cut down the period of research. AZ3166 has software and hardware and would be supported with developer community, including development kit and demo for quick connection to cloud service. Control and operation could be obtained by mobile phone or tablet.

In this guide you could konw how to connecting AZ3166 to Azure, sending and receiving data through Azure.

getting-started-hardware

Step 1: Prepare Device

What you need

  • AZ3166 board
  • Micro USB cable

Main control unit of AZ3166 is EMW3166---a low power consumption Wi-Fi module developed by MXCHIP, with DAP Link emulator and 128x64 OLED and other resources such as LED light. Sensors are integrated on the board including Motion sensor, Magnetometer sensor, Atmospheric pressure sensor, Temperature and humidity sensor. The development kit also has audio processing unit to connect to Azure for vioce recognition and voice play.

sensor

Step 2: Prepare SDK

Download SDK

SDK could be download from here.

Compiling Environment

After install mbed CLI and GNU ARM Embedded Toolchain, configure mbed in sdk file by using cmd command:

mbed config -G GCC_ARM_PATH ****

Step 3: Build and Run the sample

A. Configure WiFi

Configure WiFi in mbed_app.json. Input Wifi SSID and password in main.app as shown below.

        "wifi-ssid": {
            "value": "\"****\""
        },
        "wifi-password": {
            "value": "\"****\""
        }

B. Configure Device Registration

  • Regist azure.microsoft account to get free account for iothub.
  • Add iothub service in azure cloud control center.
  • Install Azure tool(Azure CLI) on your computer.
  • Click here to download and install DeviceExplorer,you will register your device using DeviceExplorer. Fllowing here to study how to regist your device.
  • Configure device information in iothub_client_sample_mqtt.c. As shown below.
static const char* connectionString = "HostName=****;DeviceId=****;SharedAccessKey=****";

C. Build the Sample

Use the following command(Command Prompt on Windows, or Terminal on Mac OS X)

     mbed compile -m AZ3166 -t GCC_ARM

After compile the sample. a .bin file with the same name of the SDK would be generated in the path: ...\mbed-wifi-example\BUILD\AZ3166\GCC_ARM.

D. Download Firmware to DevKit

Once the DevKit is connected, you will see a new USB mass storage device in your File Explorer.

Drag & drop the .bin file you compiled to AZ3166 device.

Wait until file copied, the DevKit will reboot to the latest firmware.

Step 4: Results

Az3166 would send data to Iothub-explorer and Iothub-explorer would receive the data.

At the same time,you can send message to Az3166 from iothub-explorer.

az3166-device-to-hub

Next steps

You have now learned how to run a sample application that collects sensor data and sends it to your IoT hub. To explore how to store, analyze and visualize the data from this application in Azure using a variety of different services, please click on the following lessons:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published