As a follow up to my recent presentation on IOT (see the previous blog) I have started a new Codeplex project with a view to developing a library for Embedded devices such as Arduino and Windows Embedded Compact to send and receive data from an Azure Mobile Service, using REST/JSon


The first two blogs in this series focus upon setting up the Azure Mobile Service data backend and a Universal App to interact with it that runs on a Windows 8.1 desktop and Windows 8.1 Phone.


 

 

The site is called CEJson and is located at:  https://cejson.codeplex.com/

The first activity focuses upon some simple REST/JSon exercises:

1. The ToDo Sample Project that you can create when you create a Mobile Service. It's a Universal app for Desktop and Phone 8.1

2. The ToDo project morphed into a Telemetry app.

These two downloads are available now.


Coming (as part of this Activity):

  • Using curl to send and receive a Mobile Service data from the command line.
  • Arduino version of the app: Real telemetry data..

Watch this space


 

 

 
To get started with 1 & 2, download the project zip files from Codeplex as above.  Each is a separate Visual Studio 2013 Solution with the following projects:

  • The Desktop App
  • The Phone App
  • The Common App
    • Contains the common UI interactions with the Mobile Service

They are Visual Studio 2013 Update 4 projects:

I used the Visual Studio 2013 Community Edition which is free (and equivalent to the Professional Edition).


You will need to create a Microsoft Azure Mobile Web Service.

- If you don’t have an Azure account you can get one for one month free with a Windows login..

Tutorial: Getting started with Mobile Services:

http://azure.microsoft.com/en-us/documentation/articles/mobile-services-ios-get-started/


The ToDo App

To use App in Project  1 you need to enter the Azure service path and key in the Main.Page.cs file in the Shared project.

- These are obtainable from eth Azure Portal.

- You will need a table in the Mobile Service called ToDoItem

- Hint: When creating the table, make as an SQL table and make sure its Dynamic

--- That way if a datum with a field not in the table si submitted, the field is dynamically created in the table!

The ToDo App  running on a Windows 8.1 Desktop:

DesktopTodoApp

The SAME ToDo App running on a Windows Phone 8.1:

PhoneTodoApp


The Telemetry/Sensor App

For second project App there is a config.xml file for setting the Mobile Service URL and AppKey.:

config.xml
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <configuration>
  3.   <service>sportronicsdj</service>
  4.   <appKey>NmlqprtsuVBtyIPOl2NKfghj2690KKl</appKey>
  5. </configuration>

Configuring the app this way means that it be reconfigured without recompilation.Smile

You will need a table in the same Mobile Service called Telemetry.

The Sensor/Telemetry App  running on a Windows 8.1 Desktop:


image

 

The Sensor/Telemetry data on Azure Mobile:

image

The SAME Sensor/Telemetry App running on a Windows Phone 8.1:


phoneSensorapp

Note, being Universal Apps, they will also run on the RT Surface.



NEXT:

CEJson – Part 2: Morphing The ToDo Sample Mobile Services Project into the Telemetry Project



Coming (as part of Activity 1)
  • Using curs to send and receive a Mobile Service data from the command line.
  • Arduino version of the app: Real telemetry data..

Watch this space