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

10259541_716835051688876_327249758_n

 

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 

Before:

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

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.

04 Cloud Computing Architecture

Let's Cloud Series - 03 Cloud Computing ArchitectureThe Cloud Computing Architecture comprises of many Cloud Components, but we have two main parts of the Cloud Computing Architecture:

  • Front End
  • Back End

Each of them are connected through a network via Internet.

04 cloud computing architecure -  front end vs. back end

FRONT END

Refers to the client part of cloud computing system. It consists of interfaces and applications that are
required to access the cloud computing platforms.
Example: Web Browser.

BACK END

Refers to the cloud itself. It consists of all the resources required to provide cloud computing services. It
comprises of huge data storage, virtual machines, security mechanism, services, deployment models,
servers, etc.