Hacking with the #RaspberryPi and #Windows 10 #IoT Core

Posted on March 24th, 2016

Nick Landry showed how to use the Windows 10 operating system to control devices in the Internet of Things.

He first talked about IoT = things + connectivity + data + analytics. He demonstrated software running on the Raspberry Pi, but emphasized that Windows 10 IoT allows developers to create code that runs on platforms from ARM devices (IoT) to phones to tablets to laptops to desktops to large displays. Within the IoT space, Windows 10 runs on

Raspberry Pi 2 & 3 – ARM processor – Wi-Fi, Bluetooth,…

Intel Atom E3800 processor x86 – (Tablet) – Ethernet,…

Qualcomm Snapdragon 410 – (cell phone) – GPS, WiFi,…

W10 also has many levels of functionality to accommodate differences in interfaces (headed = screen interface, headless = no screen interface) and differences in hardware by using a single C# development core with difference SDKs to access the different capabilities of devices.

The Windows 10 stack has the W10 operating system on which Win32 sits as does UWP. The majority of UWP APIs are shared across devices including desktop, phones, ioT, etc.

Nick then walked through the steps to replace the Linux OS with Windows 10 on a Raspberry Pi from the http://dev.windows.com/iot web site. He noted that the latest Raspberry Pi, the Pi 3, requires you to download the ‘Insider preview version’ to successfully flash the hardware.

The Raspberry Pi 3 includes wi-fi and Bluetooth, but the current version of Windows 10 does not currently handle those functionalities natively, but will eventually do so.

He next showed the Raspberry Pi and talked about how sensors and controls are connected through the GPIO pins and how the Windows 10 IoT extension SDK gives you access to those pins.

Programming the device using C# in Visual Studio uses different conventions than using Sketch in the Arduino IDE

Instead of a ‘startup’ and ‘loop’, one needs to set up a timer with the timer interrupt route serves the same function as the ‘loop’ routine in Arduino

Downloading the code requires one to select ‘ARM’ device and ‘Remote Machine’. The Arduino IDE only needs a COM port number.

Event handling is done using the C# programming syntax

Visual Studio has full access to services offered across a wide range of devices. Nick demonstrated how the text-to-speech routine can be called in the same way one would call text-to-speech when developing a smartphone app.

Simple programs require more code, but that code can be used across devices.

You can execute Arduino Sketches in Visual Studio and you can even combine Sketch and C# code in the same application.

Nick concluded by talking about The #FezHat (from ghielectronics). The Fez Hat is a development board which fits on the Raspberry Pi and includes: controls for DC and servo motors. Terminal blocks, light sensor, LEDs, temperature sensor, user buttons, etc. all for $35. It is analogous to Shield boards for the Arduino.

How to develop an internet-connected device using the Particle Photon

Posted on October 8th, 2015

Nick Landry followed his previous presentation on the internet of things (#IoT) with a presentation showing how to build a simple application using the Photon board and Azure. Nick started with a review of IoT. One application is the ‘Fujitsu connected cow’ that determines by a leg bracelet when a cow is going into heat.

He then talked about popular dev kits such as the Arduino and Raspberry Pi. He likes the Photon board by Particle since it is open source hardware and only costs $19. Unlike the Arduino and Raspberry Pi, it has wifi capabilities without needing to add a shield. However, unlike the Intel Edison and the Raspberry Pi, it does not have a full operating system (only has a microprocessor).

Unlike many other systems, such as Arduino, the build is done on a web IDE. The language is nearly identical with that the version of C used by Arduino IDE. The Photon is smaller than most boards with fewer pins, but has the advantage of pins that clip directly into a standard breadboard. There are also several boards that are designed to fit with the Photon.

Since development is on the web, the program download process is

Connect the Photon using the microUSB to your computer

Use Putty to access the Photon to get it’s id and tell the Photon the wifi network name

On the web IDE, enter the device id for the Photon

Compile the Arduino program and flash it to the Photon

Nick then walked us through some of the distinctive aspects of the Photon

Has 3.3V pins. (one 5V pin)

GPIO pins can be used either for input or output

Pins 0-7 are digital pins.

Some pins support pulse width modulation (PWM) to simulate analogue outputs from a digital pin.

Posted on February 19th, 2015

Peter Laudati @Microsoft talked about a technology called Web App Templates (WAT) for creating hybrid (native + web) apps. This approach is currently available for #Windows and #Android development (and will soon be available for #iOS). The approach aims to easily build a local shell app so a web site when accessed through the app looks and feels like a native app (a.k.a. “highly configurable native chrome” app).

The app is most easily developed when the existing web site has a responsive web design, but need not be. WAT allows reformatting of the css tags to customize the page format and creates customized buttons that can be used to access deep links in the site.

Peter demonstrated WAT for Windows which is loaded as a template into a C# project in Visual Studio. The template features a default xaml file (in the config directory) in JSON format which points to the web site and includes sample buttons for share, refresh, pin, and home. The buttons can be customized by changing icons and specifying actions to be performed. Any css tag on the page can be reformatted or hidden locally which can be useful for removing clutter on the smaller mobile screen or enlarging fonts to improve readability or suppress some native functions such as pinch-zoom.

Peter emphasized that this approach is different from that of Apache Cordova, since WAT starts with a pre-existing web application, rather than running html/css/js code locally.

Peter also talked about the weinre debugger for web pages which enables one to debut locally running html/css/js code on a mobile device with the same tools as available when debugging the page on the Chrome browser.