All Posts By

Carey Payette

carey-payette

Carey Payette is a Senior Software Engineer with Falafel Software as well as an ASPInsider. She has interests in IoT and is a member of the Maker community. Carey is also a wife, and mom to 3 fabulous boys. She is a 2nd degree black belt in TaeKwonDo and enjoys coding for fun!

Articles

GCP Pub/Sub

Pub/Sub Part 2 : REST-based Google Cloud Pub/Sub with OAuth and C#

By | .NET, Cloud Platform, Google | No Comments

This is post 10 of 17 in the series “Google Cloud for the .NET Developer” Pub/Sub is an increasingly popular component of many cloud-driven solutions. Producers publish messages to a topic, and subscribers consume them typically triggering some type of work. Pub/Sub queues are also very important when it comes to high-throughput data ingress, typically synonymous with IoT solutions. I will show you how to publish to and consume messages on the Google Cloud Platform using the REST-based API, authenticated with OAuth and using C#. Getting Started If you haven’t already, create a Google Cloud account (they offer a 60…

Read More

Pub/Sub Part 1 : C# OAuth Authentication to Google Cloud Pub/Sub using a Service Account

By | C#, Cloud Platform, Google | No Comments

This is post 9 of 17 in the series “Google Cloud for the .NET Developer” If you are looking to consume Google Cloud services, you will need to authenticate. In my case, I was looking to use a service account created for a Pub/Sub application that I have in mind. I will walk you through creating a Service Account, downloading a key and authenticating with the Google Cloud Platform using a C# library. The first thing that you will need to do is log into the Google Cloud Platform console (create a project, if you don’t already have one). From…

Read More
SMTP4Dev Local SMTP

Test Sending Email Without an SMTP Server

By | .NET, ASP.NET, C#, Microsoft, Tools | No Comments

When working on a project, I had the need to locally test the sending and formatting of an email from an application. The only downside is that I don’t have an SMTP server on my workstation, and I wasn’t about to start setting up IIS with all that ceremony. Luckily there are a couple tools that can help with this problem. Neptune The first tool I tried was Neptune. It doesn’t have source code available, but if you need a way to see if an email has been sent, it will show up with a notification in the system tray. You…

Read More
UISegmentedControl Text Color Change

Xamarin Quick Tip – Changing the UISegmentedControl Text Color

By | C#, iOS, Xamarin | No Comments

In iOS, the UISegmentedControl is a popular control. It allows you to present your data in an organized, tabbed fashion. When a segment is selected, the text on the segment is changed to the Background Color of the control, this text can sometimes become lost and difficult to read. To get around this problem, this post will show you how to change the UISegmentedControl Text Color when a segment is selected. UISegmentedControl Color Properties The UISegmentedControl has some direct color properties, I will outline the most important ones here. First we have the Tint Color, which is used as the…

Read More
iPad and iPhone

Xamarin Quick Tip : Identifying if a device is an iPad or an iPhone using UserInterfaceIdiom

By | C#, iOS, Xamarin | No Comments

If you simply need to determine whether the device using your application is an iPad or iPhone in Xamarin.iOS without additional ceremony, look no further. The UserInterfaceIdiom can be used to solve this problem. Identification of the Device Type using UserInterfaceIdiom In order to identify the device type using the application. The following code can be used:

The UserInterfaceIdiom property will return any of the following enum values: CarPlay Pad (iPad) Phone (iPhone) TV Unspecified Alternatives for a more granular Device Identification If you require a more granular approach to device identification, such as distinguishing between the specific models of each…

Read More
Software PWM at 0.35 Duty Cycle

Windows IoT Core: Software PWM

By | C#, Hardware, IoT, Microsoft, Raspberry Pi, Visual Studio, Windows, Windows Universal Apps | No Comments

One of the gaping holes in my opinion is the availability of PWM when working with Windows IoT Core on the Raspberry Pi. There are two approaches to solving this problem, one is with additional hardware to provide PWM functionality, the other is to achieve PWM with software. This article will focus on Software PWM. A Convenient Software PWM Library In poking around the web, I stumbled across this convenient library for Windows IoT Core. One of the implemented functions in this library is support for Software PWM. This library is also available as a package through NuGet. To demonstrate…

Read More
Experimental Decorator Warning

Suppressing Experimental Support for Decorators warning in VS Code

By | Angular 2, JavaScript, Mobile, NativeScript, TypeScript | No Comments

When working with TypeScript and Angular 2 in VS Code, you may encounter an Experimental Support for Decorators warning on some of the decorators you wish to use in your code. While it doesn’t affect the compilation or functionality of the application, it is a tad annoying to look at. In this example, I’m working with a NativeScript application.  Here are a couple steps to take in order to suppress this warning. Set the Experimental Decorators Property The first step in suppressing this warning, is to set the “experimentalDecorators” property to “true” in the TypeScript configuration file in the root of the project…

Read More
Two Wheel Robot on the floor

Windows IoT: Basic Control of a Two Wheel Robot

By | C#, Hardware, IoT, Raspberry Pi, Windows, Windows Universal Apps | One Comment

In my last article, we utilized a Raspberry Pi running Windows IoT Core to bi-directionally control a single DC motor with the help of the L293D chip. In this article, we will take things a bit further and have the L293D chip control two motors placed on a chassis to create a Two Wheel Robot. Materials Raspberry Pi 2 running Windows IoT Core Pi Cobbler with Ribbon Cable (optional) L293DNE chip Adafruit 2 Wheel Robot Chassis Kit (contains 2 DC motors) One 4xAA battery pack (to power the motors) Breadboard Various M-M Jumper wire   Wiring Details Wiring Details Cobbler 5v…

Read More
Single DC Motor Control Wiring Diagram

Windows IoT : Bi-Directional DC Motor Control

By | C#, Hardware, IoT, Microsoft, Raspberry Pi | No Comments

In many IoT scenarios, it is possible that automation will be required to physically move something. In order to do this, you will need to utilize some type of motor. In this example, we will control a single DC Motor using the L293DNE chip and the Raspberry Pi 2 running the Windows IoT Core operating system. Materials Required Raspberry Pi 2 running Windows IoT Core Pi Cobbler with Ribbon Cable (optional) L293DNE chip DC Motor (6v motor) One 4xAA battery pack (to power the motor) Breadboard Various M-M Jumper wire Hardware Setup Wiring Details Cobbler 5v to the Breadboard Power Rail #1 Cobbler…

Read More
NativeScript TimePicker Spinner

Controlling the NativeScript TimePicker Rendering Style on Android

By | NativeScript, Telerik | No Comments

On a recent NativeScript project,  it was decided to upgrade our Telerik UI for NativeScript Pro controls. After this upgrade our TimePicker controls changed rendering styles from this (desired style): To this: They are both very attractive TimePickers, but for our purposes we needed to have it render the same as it was originally intended, before the upgrade. Controlling the TimePicker Rendering Mode With styles.xml After some research, it was determined that there are only these two modes that TimePickers will render on Android, namely spinner and clock. In order to force our component to render the way it was intended, we needed to add styles to our…

Read More
Filtering data with the Search Bar

Xamarin Quick Tip – Adding a Search Bar to a UITableView in iOS

By | .NET, C#, iOS, Mobile, Multi-Device, Visual Studio, Xamarin | 2 Comments

A common bit of functionality required in a mobile application is including some type of search functionality in an application. Typically this takes the form of a search bar along with tabular results. In this article, I will walk you  through adding simple search functionality to a UITableView in iOS. Setting up the project Create a new blank iOS universal application with a storyboard. In the storyboard create a new UITableViewController and assign it the class name of FruitTableViewController. Name the table tblFruit. Finally, change the type of table cell to Basic, and assign it the reuse identifier of FruitCellId. If you have trouble setting…

Read More
Swipe Left on Pineapple

Xamarin Quick Tip – Swipe Left To Delete

By | .NET, C#, iOS, Mobile, Multi-Device, Visual Studio, Xamarin | No Comments

In some projects, it may be requested to be able to swipe left to delete an item in a table. In order to implement this, there is a handy component called SwTableViewCell that provides this valuable functionality.  What is missing however, is decent documentation to get it up and running with Xamarin. In this article, I will walk you through adding this component to an already existing table view. Setting up the project The first thing we need to do is to build an application that has a table populated with some items. Create a new C#, Universal iOS application,…

Read More
Creating a new Xamarin iOS Application

Xamarin Quick Tip : Add a Full Color Image to the Navigation Bar

By | .NET, C#, iOS, Visual Studio, Xamarin | No Comments

In iOS the Navigation Bar is not one of the easiest things to stylize. In a recent project, I needed to add a full color image of a logo on the left hand side of the Navigation Bar. Here is how I accomplished this requirement. Setting Up the Project Create a new Xamarin Blank iOS project in Visual Studio. I’ve named mine NavBarFullColorLogo. Creating the Storyboard Once the project has been generated. Add a new Empty Storyboard item to the project, name it Main.storyboard. Open the Info.plist file, and select Main.storyboard as the Main Interface. Open the AppDelegate.cs source file, and…

Read More
Blank iOS Appliation

Xamarin Quick Tip : Setting a UI Table View Background Image

By | .NET, C#, iOS, Visual Studio, Xamarin | No Comments

Full-screen background images are an attractive design feature in many mobile applications. In this article, I will show you how to set an iOS table view background image using C# so you can achieve full screen backgrounds on your Table View Controllers in your application. Creating the Solution Open Visual Studio, and create a new Blank iOS Application. I’ve named mine BackgroundImage. Creating the Storyboard Once the solution has finished generating, add a new Empty Storyboard to the solution, name it Main.storyboard. Next we will need to assign the storyboard to our application launch sequence. To do this open the info.plist file, and under…

Read More
Azure Preview

Using Azure Media Services to Encode, Host, and Transcribe Video

By | ASP.NET, Azure, HTML5, Microsoft, Mobile, Multi-Device, Tools | One Comment

This is post 14 of 29 in the series “A Cloudy 29 Days of Microsoft Azure” Azure Media Services has proven to be a one stop shop for all of your video needs. Azure Media Services includes encoding, encrypting, transcription and hosting services, basically it does everything except for shoot the raw video. Choose to deliver video on demand or stream video live, both of these delivery scenarios provide adaptive bitrates for optimal viewing. Consuming video in your applications couldn’t be easier than using Azure Media Player, as it brings a multi-device, multi-browser supported media player. Azure Media Services also…

Read More
Breadboard Diagram

Azure IoT Hub: Managing and communicating with IoT devices

By | Azure, C#, Hardware, IoT, Microsoft, Raspberry Pi | 3 Comments

This is post 13 of 29 in the series “A Cloudy 29 Days of Microsoft Azure” Officially declared Generally Available (GA) on February 3rd, 2016, the Microsoft Azure IoT hub aims to help ease the software development burden by providing foundational tasks when it comes to building an Internet of Things system. With device provisioning, monitoring, management and system updates provided by the Azure IoT Hub, you are free to concentrate on coding your device’s core functionality. Another alluring aspect of Azure IoT Hub is that there is a free tier that allows an account to provision and maintain up…

Read More
Twitter Connector Data

Azure Logic Apps : Orchestrating business processes and systems integration

By | Azure, Microsoft | 6 Comments

This is post 4 of 29 in the series “A Cloudy 29 Days of Microsoft Azure” Note: Azure Logic Apps is currently in Preview state. Things may change prior to it’s official release, and you may encounter bugs as well. Most systems that exist today are data-focused CRUD applications (Create, Read, Update, Delete). In an organization you typically find multiple of these applications supporting various lines of business. These applications typically play a part in satisfying an over-arching business process. Various methods exist to cobble systems together in order to solve a business need. Some integration strategies include (but not…

Read More
Wiring Diagram

IR Break Beam Hot Wheels Car Speed Track

By | C#, Fun, Hardware, IoT, Microsoft, News, Raspberry Pi, Visual Studio, Windows | No Comments

Today I bring you a fun little project. The goal of the project is to measure the speed of toy cars as they run the length of a track. Kids and adults can compete to see who has the fastest car. What you’ll need: Hot Wheels Cars A track – I used baseboard molding from a home improvement store Two 5 mm IR break beam sensors Your existing Windows IoT Core setup Wiring Diagram Wiring Details (x2) IR Break beam transceiver black wire to GND (x2) IR Break beam transceiver red wire to 5V (x2) IR Break beam receiver black…

Read More
Touchscreen Panel Application

Windows IoT Core : A Philips Hue Touchscreen Panel Application

By | C#, Fun, Hardware, IoT, Microsoft, Multi-Device, Raspberry Pi, Visual Studio, Windows, Windows Universal Apps | 9 Comments

Philips Hue is a fabulous lighting system. It is a hub based system that discovers when new bulbs are added, allowing you to grow the collection of smart bulbs in your home organically. Hue also has apps available on some mobile platforms that make customizing and controlling your lights an easy and visual task. These are all fine and dandy, as long as you have a mobile device with you at all times. Hardware switches are available to circumvent that need, but they have limited functionality and in all honesty, they aren’t all that flashy or futuristic looking. I thought…

Read More
Wiring Diagram

Windows IoT Core : Inter-Application Communication using App Services

By | C#, Hardware, IoT, Microsoft, News, Raspberry Pi, Visual Studio, Windows, Windows Universal Apps | 9 Comments

Windows IoT Core applications fall into two categories. Headless applications, also called Background applications, and Headed applications which are applications that expose a user interface. The Windows IoT Core device as a whole can also be run in a headless or headed mode. You are still able to run any number of background applications on a device that is configured in headed mode. These background applications may also be deployed alongside a currently running headed application. It is important to note that there can only be one running UI application at a given time. Background applications can be thought of…

Read More
Circuit Diagram for Sound Sensing with the Raspberry Pi

Windows IoT Core : Sensing Sound Levels

By | Blogs, C#, Fun, Hardware, IoT, Microsoft, News, Raspberry Pi, Windows, Windows Universal Apps | 3 Comments

The ability to sense the amount of sound in an environment can come in handy. From the hobbyist standpoint, you can create light elements with LED strips that light up based on the amount of sound, similar to an equalizer, to add to the ambiance of the playing music. From a commercial perspective, you can create alerts once sound levels exceed a certain threshold at a workplace (or classroom). You can also create helpful visual indicators for sound that can help those that are hard of hearing, such as a lighting-based baby monitor that will light up when a baby…

Read More
FTP Files to Windows IoT Core

Windows IoT Core: Running a PowerShell Script on Startup

By | Hardware, IoT, Microsoft, News, Windows | 4 Comments

Sometimes it is useful to be able to run various configuration scripts on your IoT device at start up. This article will outline a way to run a PowerShell script on startup of the Windows IoT Core operating system. The first thing you will need to do is build the script you would like to run. In this example, we’ll keep it simple. We’ll create a log file at startup that will log the current date. Create a new file, name it StartupScript.ps1 and add the following lines of PowerShell code:

Next we will create a simple batch (*.bat) file…

Read More
Orico Bluetooth 4.0 Dongle

Making a Smart Bracelet using Custom BTLE GATT Services, Arduino, and Windows IoT Core

By | Arduino, C#, Hardware, IoT, Multi-Device, News, Visual Studio, Windows Universal Apps | One Comment

In this article, we are going to cover how to setup your own custom GATT service on the Arduino platform and then interact with it using an application running on Windows IoT Core. The project we will create is a BTLE bracelet that has an LED light (NeoPixel) that changes colors based on the communications received over the custom GATT service. What is a GATT Service? GATT stands for Generic ATTribute Profile. Essentially, it is what defines the services and their associated characteristics that are available on a particular BTLE (Bluetooth Low Energy) device (it is also available on regular Bluetooth…

Read More
MCP3008 Chip

Analog to Digital Conversion with MCP3008 and Windows IoT Core

By | C#, IoT, Microsoft, News, Visual Studio, Windows Universal Apps | 2 Comments

The Raspberry Pi 2 is an amazingly powerful board, with plenty of great features at a low price-point. I invested in a couple Raspberry Pi 2 boards to use in my projects. I quickly discovered one feature missing on the Pi that I had grown accustomed to in an Arduino world: analog pins. I have a plethora of analog sensors that I like to tinker with, so I went in search of solutions to using them with my Pi boards. I did my research and invested in a few MCP3008 chips. The MCP3008 is a 10-bit analog to digital converter….

Read More
Serial Conversion Module

ZigBee communication with Raspberry Pi 2 and Windows IoT Core

By | C#, Hardware, IoT, Microsoft, News, Visual Studio, Windows, Windows Universal Apps | 16 Comments

ZigBee Primer A ZigBee PAN (personal area network) is a self-organizing series of modems that communicate using the same protocol (based on the IEEE 802.15.4 standard). Individual modems are configured to play a specific role within the network. Coordinators establish and organize the network (there is only ever one coordinator in a network). End Devices are the leaf nodes of the network, their responsibility is to provide valuable data. This data could be anything. It could be a power usage reading, a string relaying device status, or even a reading from a temperature sensor. The last type of configuration is…

Read More