- How to Adjust X and Y Axis Scale in Arduino Serial Plotter (No Extra Software Needed)Posted 3 months ago
- Elettronici Entusiasti: Inspiring Makers at Maker Faire Rome 2024Posted 3 months ago
- makeITcircular 2024 content launched – Part of Maker Faire Rome 2024Posted 5 months ago
- Application For Maker Faire Rome 2024: Deadline June 20thPosted 6 months ago
- Building a 3D Digital Clock with ArduinoPosted 11 months ago
- Creating a controller for Minecraft with realistic body movements using ArduinoPosted 12 months ago
- Snowflake with ArduinoPosted 12 months ago
- Holographic Christmas TreePosted 1 year ago
- Segstick: Build Your Own Self-Balancing Vehicle in Just 2 Days with ArduinoPosted 1 year ago
- ZSWatch: An Open-Source Smartwatch Project Based on the Zephyr Operating SystemPosted 1 year ago
Microsoft & Open Source: the Odd Couple
Once the icon of closed source software, the Company headquartered in Redmond realized the relentless advance of Arduino and Raspberry Pi, and made its operating system compatible with them.
Until some time ago, to draw Microsoft near the open source world was something unthinkable, since Microsoft always represented the commercial approach to software, and often started legal battles (which, to say the truth, were never too effective) against the open source movement. With the end of the Ballmer Era (the previous Microsoft CEO), the Company started however to “shed its skin”, an obvious sign that the business model that made it grow so much – and that was based on the monopolistic position granted by Windows and Office – was starting to misfire. The current CEO, Satya Nadella, looks as if he’s clearly bearing this situation in mind and, even if he’s leading the company only since a little while, he undertook obvious changes of direction. The basic strategy seems to be looking to an opening, so to change a company clearly focused on products into one offering services. Azure, the cloud platform signed by MS, clearly shows this opening by officially supporting Linux and technologies that are not particularly common in the Microsoft environment, such as Python, Node.js and many more.
The new strategy is gradually deviating in the Makers’ world, a world that Microsoft seems to be courting with particular attention, as we will explain in this article, by evaluating the emerging opportunities.
Windows 10: the unique platform
The new strategy does not abandon the operating system, that has always identified the company, but sheds its skin. Windows 10 is no longer a simple PC operating system but a unique platform for many devices.
The official release is expected in these months, with a truckload of innovations: the unification will make Windows 10 available from PCs to smartphones, passing through tablets and consoles, until reaching the embedded systems. And precisely the last ones are the ones we are interested in the most, and in particular Arduino and Raspberry Pi.
The Microsoft offer does not limit itself just to the devices we named, because Microsoft showed interest for IoT since a while already, both by supporting different embedded platforms, and by starting to offer specific services with its Cloud platform, Azure. By going a bit into details, Windows 10 will be the first operating system to be certified for Arduino.
What does that basically mean? By simplifying things, Windows 10 introduces what has been defined as the Universal Windows Platform (UWP), that is to say an API (Application Program Interface) set that relies on the Windows Core to give a series of functions from the operating system, and that can be accessed from different contexts.
Let’s resume one of the examples shown by the company: if a Maker creates a security camera with engines to traverse it, and controlled by Arduino, it may benefit from the UWP functions. For example, it may send the pictures on the cloud, or it may implement the face recognition or create a control interface.
All of this may be carried out by taking advantage of functions that are natively available in the system.
Innovations for Arduino
The projects based on Arduino are countless and the majority of them enables the interaction with smartphones and computers. By analyzing them, however, it immediately stands out that the interfacing methods being used are as many as the projects themselves. In some cases proprietary protocols are written, and thus even such a trivial function as energizing a relay (being connected to Arduino) from a smartphone, requires the implementation of the protocol on the phone as well.
In other cases more or less standard libraries are used, and they implement communication mechanisms between Arduino and the computer. This condition does not help the sharing of projects by members of the community. Integrating different projects implies a cost, and often not a negligible one, in order to understand and adapt the implemented communication mechanisms.
Microsoft perfectly understood this scenario and sensed that by offering a standard solution it would cover this grey area with an image return and a diffusion gain, and not negligible ones.
But, in practice, what is Microsoft’s proposal about? At the moment it consists of two projects, named Windows Remote Arduino and Windows Virtual Shield. Let’s see what they are about, by starting right from Windows Remote Arduino (WRA): it is a protocol implementation that is “signed” for Windows; such a protocol enables to communicate directly with the board’s processor from one of the devices running Windows 10.
In practice, it proves to be extremely easy to create applications running, for example, on a smartphone and communicating with Arduino. To see how it can be easy to carry out this kind of operations, in Listing 1 we propose a small piece of code (a snippet, as they say). The code has been written in C# and is executed on the Windows 10 device (for example, the mobile phone). It is not a complete example, but by analyzing it we immediately realize a certain familiarity. After the first lines, that initialize the objects needed for the communication, the similarities with the code typically written in Arduino’s IDE immediately stand out. The setup for the input and the output pins respectively, the first one being set at high state and the reading of an analog value, appear easy to understand even to those who never wrote code lines for Windows, but did it on Arduino. The power shown by WRA is obvious, and with less than 10 code lines it is possible to interact with the board’s inputs and outputs in a simple and immediate way.
Listing 1
Windows Virtual Shield (WVS) is no less than that: on the other hand, if possible, it is even more interesting. In this case the kind of interaction is the opposite of what we saw with WRA, since the system turns the device running Windows 10 in a virtual shield used by Arduino.
One of Arduino’s strong points is precisely given by the shields, that offer the possibility to extend the board’s functions by means of standard hardware components. For this reason, an ecosystem of accessories was born around Arduino. It practically covers every possibility: there is a GPS shield for projects requiring localisation; the WiFi shield to gain wireless connectivity; the shield sporting a display, so to have a graphical or textual output device, etc.
With WVS, our device running Windows 10 is seen by Arduino as a shield, whose sensors are all made available. In practice, this is managed by some libraries to be used within the sketches we will execute on Arduino, and by an app to install on Windows 10. With these two components, by connecting the board to Windows via Bluetooth, or directly by means of a cable, Arduino will be able to access the sensors, to use the mobile phone as a gateway towards Internet and to show information on the display.
As with most shields available to this day, the usage of WVS is mediated by a series of functions made accessible by the libraries supplied by Microsoft. These ones offer specific functions to interact with the sensors of the device running Windows 10: thus, for example, a Text class is available to enable the visualisation of the text, e. g. on the phone. As with the Camera class needed to interact with the camera; as with Speech which is needed in order to benefit from the speech synthesis system; or even with SMS needed to send messages on the mobile network (and so on), so it is in practice for each component that can be offered by the hardware running Windows.
Practical applications
Looking at the system components, we could see how some Windows 10 components make it the first operating system to be certified for Arduino. We can do a lot of things with it: with WRA, for example, it is possible to create the control interface for a home automation system, directly on a Windows mobile Phone.
With WVS, on the other hand, we could create a remote gate opener to be placed in the car: by reading the GPS coordinates from the mobile phone, it could send the opening signal only when we are close to it.
These two simple examples show the potential of these objects; it must be said that the functions given by WRA and WVS are not new additions: already now there are tools and libraries that enable doing the same things even on non-Windows operating systems.
The real innovation brought by Windows 10 is the possibility to make these functions as integral parts of the system, so to create a sort of ecosystem on which it is highly possible that countless practical applications will arise.
Conclusions
At the beginning of the article we also mentioned Raspberry Pi, but dealing with the matter would deserve many pages. To give you a “preview” we will say that, differently to what we have seen with Arduino, a Windows 10 version to be installed on Raspberry Pi (only on the second version) has been created. It is a “shortened” Windows 10 version, and named Windows 10 IoT Core Insider: it is devoid of the graphical user interface but has all the basic functions (indeed the core). It has to be seen as an alternative to Raspbian, which is the reference Linux distribution for Raspberry, by now. Moreover it must be said that Windows 10 IoT Core for Raspberry Pi is free, which makes the thing even more interesting.
What we have seen represents just the tip of the iceberg, since the greatest part of the innovations is yet to be revealed and the next months will be decisive ones. The fact that a company such as Microsoft put the spotlight on entities such as Arduino and Raspberry Pi shows how the Maker movement has made its way in (what has been defined as) the “Enterprise” world. Not much time will pass before the competences concerning these systems will start to be required in the professional field, thus giving an even greater thrust to innovation.