Whilst I'm not exiting from here, I've created a new blog site from the ground up to have all of the features I want.
Read the rest of entry »
I just received an Azure Sphere MT3620 Development kit this week and I was curious to test it.
I already have VS 2017 installed on my Win10 machine, so the preparatory work was only to install the dedicated "Azure Sphere package", which is pretty light and provides you with an Azure Sphere console (hello 80's).
The manipulations on the MT3620 Development kit start with a system update, and the definition of tenant for the card. Beware at this level because a company or scolar subscription to office365 is required (valid tenants must be in an AD) and once the tenant is set, it cannot be changed. I used my professional office365 login and registered succesfully as my board's tenant.
Once the conncetion established with the tenant's account, development and debug is quite straightforward using Visual Studio 2017 dedicated templates and tools.
One point to note: This is the first time I use Visual Studio to develop for a linux platform !!
I developped several systems based on ESP8266, but this chip has a low power consuption called "Deep Sleep".
I decided to run a simple test application which would measure Temperature and humidity every hour and to uplad the data to an Azure database. How long would it last ?
The test was quite disapointing as it ran for about a week on a 500 Mah battery. A quick analysis showed that most of the energy was not drained by the ESP8266 chip itself but by the battery adapter shield!!
I modified my circuit to add a low power timer cutting the current before the shield... and the device could then run for three month.
In creating a custom XAML UserControl, a need arose to make use of generics with the UserControl class. The control is based upon the XAML AutoSuggestionBox control and implements a quick lookup of a user from an app supplied list of users. The control uses Linq queries to efficiently search through a list of type User using Name and Id properties. The search can be on partial name completion or on user’s initials. So as to allow the use of a broad range of list types for the supplied user list, as provided in the UserControl’s hosting app, the app’s user type needs to implement a specific set of properties that are used in queries and so it must implement a specific interface (called IUser). It would have been nice to have parameterised the UserControl class using generics to specify the list of users’ data type as the apps user type and constrain it to implement the interface using generics. But the custom UserControl class does not permit generics. Consider the following: ...
I recently received an MXCHIP IoT DevKIT and I experimented the Azure connectivity functions available in the Arduino library for this platform.
The "DevKit -Get Started" section of the github gives detailed description of each step:
I'll summarize the actions I had to perform to establish an MQTT exchange between my MXCHIP board and Azure IoT Hub:
I first installed two tools on my machine:
- Ardunio IDE
- Visual Studio Code
VS Code contains all specific entries required to handle Azure functions, which are not in the Arduino IDE, moreover it is a pretty efficient IDE compared to Arduino.
Two extensions must be installed in VS Code: "Azure IoT Workbench" and "Arduino". Then the specific platform for the MX board must be installed from Arduino Board manager.
At this point I had all the tools to build and run the GetStarted applicat ...
Q. How do you get a list of classes under a namespace without instantiating those classes: Reflection
Q. How can you add meta-information, such as a description, to a class and return it without instantiating the class? Read on …
Q. What do those xmlns namespace directives at the root of an XAML page mean? Read on …
Some notes on adding and removing migrations in Entity Framework core.
EF Code First approach (Create class/es first)
Entity Framework, in Code First Manner, can auto-generate the scaffolding for accessing a database from an app from an app’s model class. In a previous blog I covered some issues wrt using Entity Framework Core with a Universal Windows (Platform) app with a Sqlite backend database. The entities are specified as classes in in a .Net Core class project separate to the app project (within the same solution). The issue addressed in that blog was a problem referencing the class library from the UWP project. This blog revisits the same topic with an emphasis upon the steps required to implement an EF Core backed UWP app.