element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Azure Sphere Starter Kit
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Azure Sphere Starter Kit
  • More
  • Cancel
Azure Sphere Starter Kit
Documents Azure Sphere MT 3620 Helloworld Blink program step by step
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Azure Sphere Starter Kit to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: hemant.tanwar
  • Date Created: 9 Oct 2019 5:16 PM Date Created
  • Last Updated Last Updated: 6 Oct 2021 10:10 PM
  • Views 1137 views
  • Likes 3 likes
  • Comments 2 comments
Related
Recommended

Azure Sphere MT 3620 Helloworld Blink program step by step

Azure Sphere MT 3620

This document goes through steps of setting up very simple blink program. The goal is to get comfortable with hardware setup and running very basic program.

 

Introduction

 

We are going to use Azure Sphere MT 3620 secure development kit. This is first dedicated hardware which handles security in IOT devices in this space.

This document explains how to create blink program. It will take you through steps needed with the assumption that you have following prerequisite

 

                Visual Studio IDE is installed.

              Azure Sphere development board

 

Details installation steps could be found here https://docs.microsoft.com/en-us/azure-sphere/install/install

 

Wire Connection

Setup wire connection to the device and your laptop as shown below.

image

Pic (1)

 

image

                    Pic (2)

 

Setting up Azure Sphere device

 

Azure Sphere uses Azure Active Directory (AAD) to enforce enterprise access control.

 

Azure Tenant Sphere

 

Azure Sphere tenant allows different organization to have many devices under them.

You either need to create a new Azure Sphere tenant or user existing one for your organization.

This https://docs.microsoft.com/en-us/azure-sphere/install/create-tenant document explains steps to do that.

 

Claiming your device

 

Every Azure Sphere device must be claimed by tenant.  Find steps https://docs.microsoft.com/en-us/azure-sphere/install/claim-device

https://docs.microsoft.com/en-us/azure-sphere/install/claim-device

 

 

You can use this command

 

azsphere device claim

 

Creating the Blink project

 

We are using Visual Studio to create this project.  Start “Visual Studio 2019” or any other version of “Visual Studio”

 

Create a new project

 

Select create new project in Visual studio project.

 

image

                     Pic (3)

 

Select Platform

 

We are creating sample blink program using existing template. In order to select right template we need to select a platform from dialog box.

Select the platform from dropdown. Select “Azure Sphere”

 

image

               Pic (4)    

 

Project name and location

 

Give project a name and select the location where this should be created.

image

                                    Pic (5)

 

Once you have created the project you can see Visual Studio open main.c file.

 

image

                                               Pic (6)

Debug with Device

 

We will see how we can debug when out Azure Sphere device is connected.  Make sure your device is connected to laptop with USB.  Select “Debug” , “ARM” as show in the screen below. Click on “Remote GDB Debugger”

 

image

                                                               Pic (7)

 

If the device is not connected, you will see following error.

 

image

                                                                           Pic (8)

 

If device is connected, you will see the LED blink indefinitely.

 

Updating Code

 

Let’s try to update very simple code to understand.

We will change our code so that LED blink only 5 times.

We will define an integer variable count, MAX and use that in while condition.

Here is code which we can update in existing code as shown in picture below

// Keep counter for how many blink

int count = 0;

 

// Max number of blinks

int MAX = 5;

 

// Stop after 5 blinks

while (count < MAX)

// Increase count after each blink

++count

 

image

                                                                                   Pic (9)

 

Conclusion

 

We have seen that setting up the Azure Sphere MT3620 is very easy. We can comfortably create simple blink program using template and run the program with great ease.

 

This device is secure and production ready IOT solution provided by Microsoft. Microsoft made reasonable effort to make it easy to work with and provided sample templated to start working with this device.

 

I believe this will help to move the needle in IOT space towards more secure ready to use IOT devices which is need of the time we live in.

So keep tinkering !!

Attachments:
imageAzureSphere-BlinkProjectSteps.pdf
  • azure sphere
  • helloworld
  • azure sphere example
  • azure sphere sample
  • azure sphere mt 3620
  • azure sphere tutorial
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
  • hemant.tanwar
    hemant.tanwar over 5 years ago in reply to apolus

    Appreciate your comment. And it make sense, I have used other platforms and find Azure Sphere is involved and many steps. I think MS can make it better for Hello world examples. But at same time , to provide enterprise level security does require additional steps, which make it difficult to hack on to IOT device. I wish we can have a world where Implementing secure solution is one step away

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • apolus
    apolus over 5 years ago

    Thank you for the great and detailed walk through, That was one of the most confusing setups of an IOT device's I ever did, all other iot dev kits were as simple as download the ide then connect the board and you're done while Microsoft made it terrible experience install too many things and registr for too many accounts, set tenant!! claim device that is one time only and you cannot reclaim later? no clear instruction on how to use sensors or any of the device capabilities!!

     

    just terrible experience, Imaging how new comers will feel after their experience with this thing, Bettergo back to my Node.mcu ,Arduino and Raspberry pi simplicity.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube