Category

IoT

Read/Write data from/to USB thumb drive on a Windows IoT Core device

By | .NET, Blogs, C#, Fun, IoT, Microsoft, Multi-Device, News, Raspberry Pi, Visual Studio, Windows Universal Apps | One Comment

Currently, universal apps are sandboxed to the point of blocking you from reading/writing data files to a removable USB drive on Windows IoT Core devices. This post will show you a work around if you really need to do this. Now, understand that this is not for store apps. If you submit an app using this work around, it will likely get rejected. However, for internal projects, it will definitely work, and work well. This is a great way of reading application initialization data and writing log data in a test apparatus and laboratory setting. Particularly when a network or…

Read More

C# Windows IoT Core Serial Communications with an ESP8266

By | Blogs, C#, ESP8266, git, Hardware, IoT, Microsoft, Multi-Device, News, Raspberry Pi, Visual Studio, Windows Universal Apps | No Comments

Windows IoT Core is great for connecting single board computers such a Pi2 to an ESP8266, via a serial link. The hardware for such a link can be found in my previous post here. The details for a basic serial communication C# framework are detailed in this post. If you have an ESP8266, there are numerous ways of communicating with them such as LuaLoader. However, I needed to communicate with my ESP8266 through a Pi2 running Windows IoT Core. This is part of a larger automated test project for an upcoming consumer project we’re developing. In this post, I’ll cover…

Read More

How to Build the NodeMCU Firmware using BoUoW

By | ESP8266, IoT, Linux, Windows | No Comments

This is post 13 of 13 in the series “IoT with the ESP8266” The Windows 10 Anniversary Update includes the Windows Subsystem for Linux, as I had mentioned in a previous post. The Bash shell (succinctly named “Bash on Ubuntu on Windows”, or BoUoW if you’re actually trying to search for information) permits native Linux ELF64 binaries to run on Windows. It’s pretty clever, but a little limited in areas. So, I wondered: since Linux is the preferred first-class build environment for ESP8266 firmware, can I build the NodeMCU firmware using BoUoW? Let’s find out! First, you will need to activate the feature and install BoUoW….

Read More

Add A Small LCD Display To Your Raspberry Pi

By | IoT | One Comment

Recently, I needed to put together a Raspberry Pi-based solution to run a Node.js app. I didn’t need Windows IoT Core or X-Windows – just a Linux TTY would do. But, I also wanted to include a LCD display to eliminate the need for a HDMI monitor.  Was it possible? Selecting and Configuring Display Hardware A quick search of the internet reveals many 3.5 inch screens for the Raspberry Pi. In fact, there are many different screen sizes available, but the 3.5 inch matches the footprint of the Pi itself. These are typically TFT displays with an SPI interface that plug into the Pi’s…

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
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

Quick serial clip connector for your multiple IoT PCBs

By | Blogs, ESP8266, IoT, News | No Comments

You don’t need a fancy USB serial connector for your multiple IoT PCBs. It’s easy to create your own quick and inexpensive connector. This is an example of a simple quick-connect serial clip that can connect a PCB- mounted ESP8266 to a computer via USB. If you don’t want the expense or bother of soldering on a fancy USB connector to your many IoT PCBs for flashing and/or programing your ESP (or other) device, you have options. I worked out an easy, cheap, and reliable method of making a quick short-term connection. You need a few things. Some parts you…

Read More

Traveling with Wi-Fi IoT Devices

By | Hardware, IoT | No Comments

These days, a lot of Wi-Fi IoT devices are intended for use in your home where there is typically only a single Wi-Fi access point. You set up the device one time, and then as long as the SSID and password never changes, the device will just continue to work. But, taking that same device on the road can prove to be a challenge. Add a hotel or conference center wireless network into the mix, especially one with a Captive Portal, and it can be next to impossible to get the device onto the internet. I have started using a travel router with…

Read More
Adafruit BMP280 sensor: https://www.adafruit.com/products/2651

A Simple IoT Project using NodeMCU

By | IoT | No Comments

This is post 12 of 13 in the series “IoT with the ESP8266” At a recent conference, I showed a simple demo for the ESP8266 using NodeMCU. This demo connected to Wi-Fi, synchronized the time with an internet time server, and then read temperature and air pressure from a sensor every 5 seconds and published the values to a MQTT broker. It was essentially a fully functional IoT solution (minus a lot of the exception handling and compensation that a more polished app would include). For the temperature and barometer, I used a BMP280 sensor available on a small board from Adafruit that…

Read More

How to Set the Current Datetime with NodeMCU

By | IoT | One Comment

This is post 11 of 13 in the series “IoT with the ESP8266” When the ESP8266 starts up, the Realtime Clock (RTC) is not initialized. If your IoT project has the need to provide timestamps in its generated data, then your code will need to fetch the current datetime from a server after the network is available. One way to do this with NodeMCU is to use the sntp (Simple Network Time Protocol) module in conjunction with the rtctime module. The sntp module will fetch the time from a specified time server (could be on your LAN, or from an official source on the internet) and…

Read More
Wi-Fi

ESP8266 and Wi-Fi Channels

By | ESP8266, IoT | 4 Comments

This is post 10 of 13 in the series “IoT with the ESP8266” The ESP8266 supports operating as a Wi-Fi station (station mode), an access point (softAP mode), and can even do both at the same time (softAP+station mode). However, there is one important detail that must be understood or else it will come back to bite you: the radio in the ESP8266 only supports one hardware channel at a time. What does this mean? Well, 802.11b/g/n operating on 2.4GHz has 14 different channels that can be used (though, in North America, we can only use channels 1-11 due to…

Read More

ESP8266/NodeMCU Deep Sleep

By | ESP8266, IoT | 8 Comments

This is post 9 of 13 in the series “IoT with the ESP8266” Sometimes, an IoT device will perform small chunks of work, and then will otherwise be idle. For instance, a weather station with sensors for temperature, pressure, and humidity (such as the BME280) may only need to take a reading every 15 minutes and broadcast to the cloud – something that requires 10 seconds to accomplish. If the device is powered by a battery, then you want it to enter a deep sleep state in between the work cycles in order to maximize battery life. But, how would you force an ESP8266 to…

Read More

Azure Stream Analytics – analyzing and reacting to streaming data

By | Azure, Data & Storage, IoT, News | 2 Comments

This is post 16 of 29 in the series “A Cloudy 29 Days of Microsoft Azure” Microsoft Azure Stream Analytics is a powerful service that allows you to analyze and react to real-time streaming data in Microsoft Azure. It gives you full control of taking streaming input data, analyzing it and moving it to a destination. Let’s take a look. First, set up a Stream Analytics account in Microsoft Azure. If you don’t already have an account, you can setup a free 30 day trial. To set up a Stream Analytics job, you will need a job name, region and…

Read More

Azure EventHub – Getting your device data to the cloud

By | Azure, IoT | No Comments

This is post 15 of 29 in the series “A Cloudy 29 Days of Microsoft Azure” Sticking with my IoT theme for this Azure blog series, I am going to show you how to use the Azure EventHub to write data to the cloud. In my previous post, Azure IoT Hub – Connecting your device to the cloud with MQTT, I talked about leveraging Azure IoT Hub which is also a great mechanism to write your IoT Data. In this post I am going to show how to use an http mechanism to write data to the Azure Service Bus…

Read More
Breadboard Diagram

Azure IoT Hub: Managing and communicating with IoT devices

By | Azure, C#, Hardware, IoT, Microsoft, Raspberry Pi | 4 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

Azure IoT Hub – Connecting your device to the cloud with MQTT

By | Azure, IoT, News | One Comment

This is post 12 of 29 in the series “A Cloudy 29 Days of Microsoft Azure” In the Brave New World of IoT, many of us who are trying to make things happen are looking for all the help we can get. Currently, I am building products and helping customers create solutions that embark on the IoT journey. First things first, you need to get your device up and running and make the local software/firmware work. If that isn’t hard enough for you, you have to start the journey to find out how to connect your device to the cloud…

Read More

Programming GPIO on the ESP8266 with NodeMCU

By | ESP8266, IoT | 10 Comments

This is post 8 of 13 in the series “IoT with the ESP8266” IoT devices (a.k.a., Things) aren’t very interesting if they cannot interact with the world around them. As Makers, we need to hook up sensors, light up LEDs, and communicate with other devices that are wired up to our Things. To do this, we need IO functionality that can be programmed. GPIO (General Purpose Input/Output) refers to a set of generic pins of a microcontroller that can be used for digital signaling. GPIO pins can be individually set to act as input or output, and values can be either…

Read More

Working with Files in NodeMCU on the ESP8266

By | ESP8266, IoT | 6 Comments

This is post 7 of 13 in the series “IoT with the ESP8266” What is SPIFFS? One of the coolest things about the NodeMCU firmware is that it includes a SPI Flash File System (SPIFFS) module. This means that data and scripts can be written to and read from the flash memory using the concept of files instead programming against raw memory locations. Flash memory allow random access reads and writes. But, by nature, flash memory only allows erasure for entire blocks of memory (i.e., 64 kB) at a time. When erased, a NOR flash memory address will contain all…

Read More

Let’s Do Something with the ESP8266 using NodeMCU

By | ESP8266, IoT | 3 Comments

This is post 6 of 13 in the series “IoT with the ESP8266” Get to a Prompt Up until now, I’ve been putting out a lot of high-level background information about the ESP8266 and different firmware in order to establish a baseline of knowledge about the platform and its history. Now that you [hopefully] have NodeMCU installed onto your own ESP8266 device, let’s do something with it. Connect your device to the USB port, and open a serial terminal program. If you’re looking for a serial terminal for Windows, then you may want to try out RealTerm. It has become my…

Read More

How to Wire the ESP8266-12 for Programming

By | ESP8266, IoT | 8 Comments

This is post 5 of 13 in the series “IoT with the ESP8266” In my last post, I discussed how to acquire the NodeMCU firmware, and then how to flash it using a serial port (or, rather, your USB port). The assumption that I was making was that people already had the ESP8266-12 module in an easy-to-work-with form, like the NodeMCU DevKit or Adafruit Huzzah. But, some of the readers only had the bare module. I was asked what it would take to ready the ESP8266-12 module itself for programming. My response follows: ESP8266-12 Pinouts Here are the pinouts of…

Read More

NodeMCU Firmware for the ESP8266

By | ESP8266, IoT | No Comments

This is post 4 of 13 in the series “IoT with the ESP8266” Introducing NodeMCU The NodeMCU Firmware is an open source project that provides an abstraction layer on top of the Expressif SDK for the ESP8266. While the SDK itself provides low-level access to the peripherals of the ESP8266EX chip, NodeMCU provides a high level API that hides a lot of the implementation details of how the chip works. NodeMCU includes a version of the Lua programming language that is based on eLua. Like many developers, I was personally first introduced to the Lua language by means of a…

Read More

ESP8266 Firmware

By | ESP8266, IoT | 3 Comments

This is post 3 of 13 in the series “IoT with the ESP8266” Firmware is the term given to software that runs from non-volatile memory (NVM) on a piece of hardware. It is the “permanent” program stored in the ROM of any device that contains a processor, like your TV’s remote control, your digital camera, your Wi-Fi router, and even modern light bulbs (the programmable LED ones). It is considered non-volatile because the program survives power-down states without requiring any sort of supplemental battery power. Historically, a device’s firmware is set during manufacturing and never changed. Though, since re-writable flash…

Read More

Introducing the ESP8266-12 Module

By | ESP8266, IoT | No Comments

This is post 2 of 13 in the series “IoT with the ESP8266” Don’t let the $2-3 price fool you: there is a lot of functionality packed into the ESP8266-12 module by Chinese manufacturer AI-Thinker. The ESP8266EX itself is a System on Chip (SoC) produced by another Chinese manufacturer, Espressif. Within this tiny 5mm TSLP package is: a 32-bit 80 MHz microcontroller based on the Tensilica LX106 64 KB of Instruction RAM, 96 KB of data RAM Built-in 2.1 GHz 801.11 b/g/n Wi-Fi interface (TR Switch, Balun, LNA, Power Amplifier, and Matching Network) 17 GPIO pins with internal pull-up/pull-down resistors…

Read More