Building Auto Guided Robot – Part 1: Intro to Fuzzy Logic


I am going to build an Auto Guided Robot using Fuzzy Logic, UWP App (C#), Windows 10 IoT Core, and Raspberry Pi 3, and I will divide this tutorial into a couple of blogs to make it easier, shorter and quicker to learn and implement.

This is the robot, you will see at the end of this blog series: (hopefully working as intended 🙂 )


In this blog post, I will show you how to use Fuzzy Logic in your UWP (Windows 10) Applications to make it much smarter and usable, but before we get started, Do you even know what is Fuzzy Logic? Don’t Worry! I will tell you in a nutshell what is fuzzy logic?

Fuzzy Logic:

It’s an approach to computing based on “degrees of truth” rather than the usual “true or false” (1 or 0) Boolean logic on which the modern computer is based on.
Fuzzy logic seems closer to the way our brains work. We aggregate data and form a number of partial truths which we aggregate further into higher truths which in turn, when certain thresholds are exceeded, cause certain further results such as motor reaction.
A similar kind of process is used in neural networks, expert systems and other artificial intelligence applications.
Fuzzy logic is essential to the development of human-like capabilities for AI, sometimes referred to as artificial general intelligence: the representation of generalized human cognitive abilities in software so that, faced with an unfamiliar task, the AI system could find a solution.

Continue reading


Controlling Servo Motor

Servo Sample Connectivity

In this blog post, I’ll show you how to control a servo motor with a UWP App installed on a Raspberry Pi 2, running Windows 10 IoT Core.

Step One:

You need to connect your Servo Motor to the Raspberry Pi 2 as show in scheme:

Servo Sample Scheme

Step Two:

Now, you should write the code that will control the servo motor, you will find the source code HERE
Clone this code, and you will find two methods: PWM_R() which will make the servo motor rotate to the right and PWM_L() which will make the servo motor rotate to the left.

and you’ll find also the event handler which will be invoked each time you press the push button.


And here’s a video of the result you should get:

Introduction to Arduino



In this blog, I’ll get you started into Arduino; what is it? How to program it? and so on…
so, Let’s get started by this question:

What is Arduino?

  • Arduino is an open-source electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects.
  • Arduino senses the environment by receiving inputs from many sensors, and affects its surroundings by controlling lights, motors, and other actuators.
  • You can tell your Arduino what to do by writing code in the Arduino programming language and using the Arduino development environment.

Arduino Boards:

  • Uno
  • Mega
  • Nano
  • Mini
  • Lilypad
  • etc..

The differences are in the number of I/O pins, type of micro-controller, speed of processor.

Arduino Uno:

  • ATMega328  (16MHz – 32KB)
  • 14 I/O Pins (5v Max. – 40 mA)
  • 6 PWM
  • Power Up (USB – 6-20v Battery) (Preferred 7~12v)

Why Arduino?

  • Cheap
  • Cross-Platform
  • Simple, clear programming environment (IDE)
  • Open Source

Now, you can download the IDE from HERE, and get started to coding in next blogs.

You can watch this video to get in more:

Part 1:


Part 2:


Part 3:


And here’s the slides:

Control your LED with Cortana(Lights Demo)

In this tutorial you will end up by controlling and LED connected to Arduino Uno with a UWP Application on Windows 10 using Cortana via Bluetooth Interface.

First of all you will need some tools such as:

  • Arduino Uno
  • Breadboard
  • LED
  • Bluetooth Module
  • Jumpers
  • Windows 10 and Visual Studio 2015 installed on your PC

This tutorial is divided into three parts:

  • First one the Hardware ConnectionYou will connect the LED to the Arduino Uno, and connect the Bluetooth Module to the Arduino as well. (as shown in the scheme below)
  • Second step is to write an Arduino Sketch that receives serial messages which turn on/off the LED and then create UWP App which will connect to the Arduino through Bluetooth.
  • Third one is to Activate and Handle Cortana voice commands.

You will find the source code below demonstrating all of these steps.

This is the final result you should get by the end of this tutorial.


And this is a complete tutorial to walk you though.

Here’s the scheme:BLE LED

Internet of Things (IoT), What? Why?

IoTI’ll be talking about the Internet of Things in a couple of posts, so stay tuned to the upcoming posts of this series of Internet of Things.

In this blog we will be walking through the definition of Internet of Things and what does that mean.
In the few past months we heard “Internet of Things” lots of times, but not all of us knows exactly what does it mean actually, so let’s get started with a very simple question:

What is Internet of Things?

Continue reading

Windows10 SplitView Control | Hamburger Menu

21In this blog, I’ll be talking about a new Xaml Control in Windows 10 which is “SplitView | Hamburger Menu” Control, and here’s an example in some apps in Windows 10


Note: if you didn’t get Windows 10 Developer Tools, you can check this Blog to get you ready.
So, Let’s Start building this in our upcoming Windows 10 Apps 😉 Continue reading

Get your App Package Family Name

In this blog, i’ll show you how to get you App PackageFamilyName in Windows 10 in C# Code without Store, because it’s not available yet for Windows 10 


In Windows and Windows Phone, we used to get App PackageFamilyName from the Store by “Associating the App, and get the unique PFN of the App”

Why do i need PFN:

If you are intending to use communication between Apps, or using App Services, you’ll absolutely need the PFN to connect the App and Service you are using or whatever the scenario you are building.

Let’s Get Started:

  1. Open Visual Studio 2015 CTP, Create new project, select Windows 10 (Blank Template)
  2. Open MainPage.xaml.cs and these namespaces.
    using Windows.ApplicationModel;
    using Windows.UI.Popups;

    The first, because we will be using a class inside it called Package
    and the second, to show MessageDialog.

  3. Then, in Public MainPage() add this code.
    var currentPack = Package.Current;
    var pfn = currentPack.Id.FamilyName;
    new MessageDialog("PFN = " + pfn).ShowAsync();

    This code to show the PFN in a Message Dialog using Package Class.

  4. Now, run the demo, and the PFN should appear in a Message Dialog as shown:

Now, you have got your App PFN, you can use it to connect to other App using App Services.
Here’s the Code Sample.
Feel free to contact me, if you face any problem.