element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Andy Clark's Blog Azure Sphere Secure IOT - Connecting Hardware
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Workshopshed
  • Date Created: 16 Nov 2018 1:30 PM Date Created
  • Views 1419 views
  • Likes 6 likes
  • Comments 5 comments
  • azure sphere
  • iot
Related
Recommended

Azure Sphere Secure IOT - Connecting Hardware

Workshopshed
Workshopshed
16 Nov 2018

Updated SDK

This week there was an update of the SDK for the Azure Sphere so I thought I'd download that and the other tools I was using. The SDK now has support for storage, real time clock, storage and external MCU flashing, although it looks like the documentation and examples need a bit of work still.

image

https://azure.microsoft.com/en-us/blog/update-18-11-for-azure-sphere-in-public-preview/

 

One message in the update was that there was a updated network driver for running a VPN over USB. There's two interesting points about this, firstly it should mean that the data travelling between the programming machine and the board should be secure. The other is that it should mean that the technology is simpler as both OTA and USB connections are using the same approach.

image

I was looking forward to seeing the RTC but there seems to be just one function call to "sync" the clocks, I'll have a look into that.

 

There were also some other internal changes as the old Blink example that I'd built previously now did not work. So I just loaded up the new template instead. This annoying but an expected side effect of working with beta software.

 

Hooking up hardware

Once I'd got blink working I thought I'd try that again with an external LED.

image

 

I swapped out the red LED with one of the GPIO pins on header 1 and fired up the code. The debug console returned the following.

 

Opening MT3620_RDB_HEADER1_PIN4_GPIO.
ERROR: Could not open LED GPIO: Permission denied (13).

 

That's because I'd not updated my app_manifest.json to include GPIO0 aka Pin4. Once I'd done that the code worked fine.

image

 

UART

So we can determine the position and orientation, I purchased a Ublox NEO-M8N GPS & Compass. This was packaged for use with a drone flight controller so I needed to swap out the connector with some suitable for the 0.1in pins. I'd found some wiring examples online but my colours did not match so I unscrewed the case to re-assure myself and was glad to see the connectors were labelled.

image

Using the U-Centre tool and a USB to TTL adapter, I experimented with different Baud rates until I got some output. The module seems to continuously stream messages. There's a massive 300 page manual on the protocol but I've ascertained that there's commands that can be sent to turn on and off the different messages that are streamed. I'll also take the device outside (or perhaps under the skylight) so I can see if I can pick up some satellites.

image

 

GPIO / Stepper Motor

For the stepper motor, I had a couple in my drawer but the 28BYJ-48 was a good size and also had a suitable ULN2003 board to drive it. I slimmed down and ported the code from the Topsy Turvy Clock.

 

https://github.com/Workshopshed/IOTCompass/blob/master/Mt3620App/Mt3620App/stepper.c

 

And then tested it first with just the LEDs and the debugger, then running with the motor.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • Workshopshed
    Workshopshed over 6 years ago +1
    Looks like others are doing parallel work. I spotted matsujirushi’s blog today had a mention of Build of the project "SteppingMotor.vcxproj"
  • Workshopshed
    Workshopshed over 6 years ago in reply to codeputer +1
    codeputer , if you could find a printer that could run from a serial port then you should be able to have that printing from one of the Azure Sphere boards. Something like a receipt printer perhaps? Make…
  • codeputer
    codeputer over 6 years ago in reply to Workshopshed +1
    That pic really looks like the printer I bought on a chance that I can get it to work! I'm new to all of this but my use case needs the security of Sphere to ensure its not compromised.
  • codeputer
    codeputer over 6 years ago in reply to Workshopshed

    That pic really looks like the printer I bought on a chance that I can get it to work! I'm new to all of this but my use case needs the security of Sphere to ensure its not compromised.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 6 years ago in reply to codeputer

    codeputer , if you could find a printer that could run from a serial port then you should be able to have that printing from one of the Azure Sphere boards. Something like a receipt printer perhaps? Make sure you get one that can do graphics as well as characters. One of the issues with the Azure Sphere platform is that there are limited drivers / examples but it should be possible to port an arduino example.

     

    1. image
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • codeputer
    codeputer over 6 years ago

    Looking at adding a printer - have you seen a project that does this?  Simple printing capabilities is all that is required for my use case, however, printing a QR Code would be nice.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 6 years ago

    Looks like others are doing parallel work. I spotted matsujirushi’s blog today had a mention of Build of the project "SteppingMotor.vcxproj"

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 6 years ago

    Nice update.

     

    DAB

    • 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