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

fuzzylogic_system.jpg

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

18342827_1391725417556053_2588661008783146475_n.jpg

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

Advertisements

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