New York Tech Journal
Tech news from the Big Apple

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

Posted on March 24th, 2016

#MMADNJ

03/23/2016 @Microsoft, 101 Wood Ave South, Iselin, NJ

20160323_192440[1] 20160323_203838[1]

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

  1. Raspberry Pi 2 & 3 – ARM processor – Wi-Fi, Bluetooth,…
  2. Intel Atom E3800 processor x86 – (Tablet) – Ethernet,…
  3. 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

  1. 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
  2. Downloading the code requires one to select ‘ARM’ device and ‘Remote Machine’. The Arduino IDE only needs a COM port number.
  3. Event handling is done using the C# programming syntax
  4. 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.
  5. Simple programs require more code, but that code can be used across devices.
  6. 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.

For further information, Nick suggested

http://themakershow.io

https://microsoft.hackster.io

If you’re having problems installing Windows 10 on a Raspbery Pi see.

posted in:  Internet of Things, Microsoft, MMAD, Programming    / leave comments:   1 comment

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

Posted on October 8th, 2015

Microsoft Mobile App Developers of New Jersey  #MMADNJ #iot #particle #azure

10/06/2015 @Microsoft, 101 Wood Ave, Edison, NJ

20151006_191744[1] 20151006_200611[1] 20151006_204013[1]

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

  1. Connect the Photon using the microUSB to your computer
  2. Use Putty to access the Photon to get it’s id and tell the Photon the wifi network name
  3. On the web IDE, enter the device id for the Photon
  4. Compile the Arduino program and flash it to the Photon

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

  1. Has 3.3V pins. (one 5V pin)
  2. GPIO pins can be used either for input or output
  3. Pins 0-7 are digital pins.
  4. Some pins support pulse width modulation (PWM) to simulate analogue outputs from a digital pin.
  5. The Cloud can talk to the photon using FTP

Finally Nick demonstrated the programming and running of three apps

  1. The “hello world” for iot – flashing LED
  2. A shot dispenser that is voice activated through the web
    1. Speech recognition in the cloud
    2. Triggers a web page that FTPs a message to the Photon
    3. The Photon triggers a relay briefly
    4. The relay opens a tap
  3. Temperature and humidity sent to Azure

The slides for the presentation are available on: http://aka.ms/mmadnj20151006

posted in:  Internet of Things, Microsoft, MMAD, Programming    / leave comments:   No comments yet

Expand Your Mobile Web Presence in the Windows Store With Hybrid Web Apps

Posted on February 19th, 2015

Microsoft Mobile App Developers New Jersey hosted by Nick Landry

02/19/2015 Microsoft New Jersey Office in Iselin, 101 Wood Avenue South, Iselin, NJ

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.

posted in:  Microsoft, MMAD    / leave comments:   1 comment