Edi Wang

Microsoft MVP for Azure

All Posts

UWP App for the Raspberry Pi Azure Surveillance Camera

I wrote a post about Raspberry Pi Surveillance Camera with Linux and Azure, it was using an ASP.NET website for displaying the photos. I made an UWP client App these days, you can download from here https://www.microsoft.com/store/apps/9nblgggzfnv0 (Because WP is already finished, so I don't provide Windows 10 Mobile package) It doesn't allow upload photos, because the photos should all come …
MVVM Binding

Read AppSettings in ASP.NET Core 2.x

Today, I was rewriting an old ASP.NET MVC5 Demo project to ASP.NET Core, and found that the way we used to read Web.config by ConfigurationManager.AppSettings[] is no longer working. .NET Core has many new ways to achieve this. I picked one that suitable for my project. Here is how I do it. The Classic ASP.NET Code web.config Controller private static CloudBlobContainer GetBlobContainer() …
.NET ASP.NET

Windows 10 UWP开发:拼音首字母分组如何去掉“拼音”前缀并支持切换系统语言

Windows 10里面有个脑残设计,就是系统默认的CharacterGroupings类型在中文版系统上会产生除了A-Z字母以外的带“拼音”前缀的另外24个分组。比如开屎菜单里就是这样: 如果我们用这个CharacterGroupings类型去创建带分组的ListView,就会变成这样: 更蛋疼的是,如果用户的系统是英文语言的,他就会发现分组变成空白了,没有任何数据。用户不知道这是微软干的,又得给我们的APP打1星,还要骂我们傻逼。 今天经过研究,终于把这个问题给解决了,不仅去掉了“拼音”前缀,也不用担心用户系统是什么语言的,都能正常显示分组列表。 我们先看看原来的代码。 public class AlphaKeyGroup<T> : List<T> { const string GlobeGroupKey = "?"; …
Windows UWP

Sharing Images in Windows 10 UWP

Starting from Windows 8, one big feature for Windows Store Apps is to share data using Charm Bar across Apps. Although the Charm Bar is removed in Windows 10, but the API for sharing is still in the fight.  For example, in my "Image Portray" App, I can share ink to OneNote or Outlook. Today, I added same capability for my "Shanghai Metro" App. Here's how to do it. First, to share data across …
Windows UWP

Raspberry Pi Surveillance Camera with Linux and Azure

Because Windows 10 IoT Core is not supporting Pi Camera, I can only use Linux instead. These days, I made a surveillance camera, the functionality is simple, when a person passed by the camera, it will take a picture and upload to Microsoft Azure Storage. It also got a website to remotely view the photos. 1. Hardware A PIR Sensor, a Pi Camera, a couple of jump wires. Connect the Singal port of …
Azure IoT Raspberry Pi Linux Python

Uploading PiCamera images to Azure

Recently Windows 10 IoT Core Build 14393 is coming, but still without PiCamera support, WTF. So I can only choose Linux for my project. When I was using Windows, I use C# + Azure SDK to upload photos to Microsoft Azure. So how to do it on Linux? After some research, here's how to do it. My system is Raspbian Linux. First, we need to install Azure SDK in SSH Terminal: sudo pip install --pre azure …
Azure Raspberry Pi Linux Python

Raspberry Pi 3 and Windows 10 IoT Core Basics

最近有时间,总结了一下关于树莓派3及Windows 10 IoT的基础知识。适合没有接触过硬件但有一定编程经验的读者入门。我自己刚刚买树莓派的时候花了很长时间入门,搞清楚各种概念和属于。很多网上的帖子都是分散在各个角落的,并且是英文的,有些还是过时的,有些是爆的,所以我觉得有必要总结一篇基础入门帖子。这篇文章讲的都是抛砖引玉的概念,并不包括End-To-End的Case,想要做一个完整实验的文章,请看我博客的物联网开发系列文章:http://edi.wang/category/list/iot  如果有错误和补充,欢迎在评论里指出。 一、树莓派3 树莓派是基于ARM芯片的卡片电脑,大小和一张信用卡一样。今年推出了第三代,集成了板载蓝牙和WIFI。之前的树莓派1和2都是需要用USB WIFI和蓝牙实现的,所以你要是购买树莓派,买3是最方便的,可以省去USB WIFI和蓝牙的配件。并且 …
IoT Raspberry Pi

How to use Windows RDP to connect Raspbian Linux

Because Windows 10 IoT Core is not yet ready to replace Raspbian, in some case, we have to use Linux. The remote operation on Linux is usually done by SSH. If you want remote desktop like the one on Windows. There are two options: tightvnc or xrdp. I used to  use tightvnc, it does not have any problem with daily use. But I have to install a tightvnc client on my PC. However, XRDP can be supported …
IoT Raspberry Pi Linux Remote Desktop

Windows 10 IoT: How to Drive an SSD1306 I2C Display

I bought a 128x64 0.96 inch OLED display, like this one: The driver chip for this screen is called SSD 1306, typically, this chip will have 2 layouts, SPI or I2C. However, the examples fo how to drive I2C with SSD 1306 is very rare, and they run on Raspbian not Windows. Luckly, with the help from a Microsoft Staff in US, we finally got the code to run the screen on Windows 10 IoT Core. 1. …
IoT Raspberry Pi

315MHz Remote Door Control by Windows 10 IoT

In the past few days, I have implemented a device that mimics the remote control door of a garage with a Raspberry Pi and share it with you. First of all, I will introduce the remote control and receiver board I use, this kind of remote control module can be bought everywhere in China, and it basically looks like this. Many roller shutter doors and garage doors use this remote control module. For radio experiments, the non-locking version is purchased, so note that it is best to purchase the antenna at the same time. The antenna is a 50 ohm single-core wire, in fact, it is a copper wire, pay attention to the frequency when buying, the radio license frequency in Chinese mainland is 315MHz
Windows IoT Raspberry Pi