Internet of Things
As part of a series of articles on a set of projects targeted at using a Windows Surface device as the presentation layer for a RPI or Arduino device, this article views the apps as state machines and documents the app states coupling through message passing between them.
Read the rest of entry »
This article reworks the previous few articles that use BT Serial and the connectivity so that USB virtual serial is used for communication. It covers in detail USB Serial connectivity between a UWP app and an Arduino devices as well as with a Windows 10 IoT-Core device (eg RPI).
The second article in this series covered development of a BT enabled Arduino Sketch that send its required UI to the UWP app as two json text strings. Also when the app is configured, the UWP app can send the UI key presses as encoded characters. This article covers how to implement same as a Windows 10 IoT-Core app that can run on a RPI.
The previous article in this series covered implementing an Arduino device as the remote app that send the UI configuration at start up to the UWP app so that the UWP app can configure the UI for it as an array of buttons. The Arduino device executes a state machine. The article covers the BT connectivity from within the UWP app and the implementation of the UWP apps mirror of the state machine.
In the previous article, issues with and how to connect a Windows 10 system to an Arduino device using the Classic (Generic) Bluetooth Serial (SPP) connectivity was covered in detail. This is so that a UWP app running on a Windows 10 device can act as the UI for an app running on a remote device such as an Arduino or IOT-Core device. The UI a dynamically generated array of buttons with multiline text that when pressed send a code representing the button to the remote app for interpretation. There is also a list box in the UI that can be used to display messages from the remote app. The UI specified in Json is passed via the serial medium from the remote app to the Windows system and used to generate the app’s UI dynamically in XAMl at runtime. This article covers the code to receive the json text from the remote device and how to interpret it within the UWP app as well as how to pass the button code and get the remote app’s text messages.
The Story so far: We are working towards rejigging an old Surface 1 or 2, or any old Windows Tablet/Laptop with a touch screen, to be the UI for a remote app running on a device such as an Arduino or Windows 10 IoT-Core. We have developed a Windows 10 UWP app that programmatically sets up the UI as an XAML grid of buttons. These buttons are rounded boxes whose content is a multiline TextBlock. If disabled, these buttons can individually just be fixed textual content in the UI. The grid and button’s text is specified in a Json string which is loaded from a file present in the UWP app. A ListView box was added so that the remote app can send back text to be displayed. The intention is for the UWP app to communicate UI button presses to the remote app over various mediums such as Bluetooth, RS232, Network Sockets etc. to facilitate the download of this Json content from the remote app. Later on we will port the UWP app backwards to Windows 8.1 so it can run on the WinRT( ARM) Surface 2.
This article covers Bluetooth connectivity between the UWP UI app running on a Windows 10 Surface Book 2 and an Arduino Uno (compatible). Button presses on the UWP app are sent to the Arduino device as single (unique) character and echoed back to the app. Upon return the button’s text is looked up and displayed in the TextBlock. Special characters can initiate command actions in the remote app. One button press will get the remote app to send the grid Json configuration text to the UWP app so it can (re)configure the grid. In this manner the UWP app engenders some universality in that it can be configured for a variety of remote apps, by that app at runtime. The first part of this article covers the device to device Bluetooth Serial Port connectivity. The second part covers the Bluetooth connectivity fro a UWP app and an Arduino device.
In this article I discuss two ways to the refer a UWP app to an Entity Framework Model Class Library, which appears to not be possible through the normal method of adding references between projects in Visual Studio.
I lost the ability to set the device Target so can’t download a UWP app to a Windows Phone or IoT-Core device.
In App Project Debug Settings I got an error:
An error occurred trying to load the page.
Exception from HRESULT: 0x89721500
In a discussion about the demise of Silverlight, I came across this succinct dichotomy (as a diagram) of “Modern” apps in the Windows Mobile context.
My Lumia 930, on the Windows Insider Fast Track started running hot and flattening the battery in about 4 hours, before Christmas after the most recent update.
I provided feedback but could not find a solution. Final solution I found that worked was to do a a Factory Reset. I backed up my data first. On reset I let it reinstall my previous apps that were installed etc.