How to capture images and video on the beaglebone – I do this using Open Source Computer Vision (OpenCV) image processing. OpenCV image processing captures image and video data on the BBB (Beaglebone Black) with the help of USB webcams by using python script programming. It is simple tutorial where you can also add effects in the form of black and white image, motion detection, sharp picture etc. I have used opencv library which programs functions of real time computer and machine learning. In this project required tools are Webcam and Beaglebone Black.
Getting started with Beaglebone Black
Beaglebone Black aka BBB is a low cost open source development board mainly used by developers and lobbyists. Although it’s quite similar to a Raspberry Pi yet it comes with some additional features. Developed by a non-profit corporation beagleboard.org, this credit card sized board also supports embedded Linux platform. Due to the presence of so many advanced peripherals, it is also considered to be a minicomputer.BBB consists of core architecture of ARM family and houses AM35X ARM cortex A8 (1GHz) processor. It can be powered either through a micro USB port or an external 5V supply that is present as an optional arrangement.
How to Make First Python Program with Beaglebone Black (Part 2/15)
Beaglebone black supports various high level languages such as a C, C++ and scripting languages like java, python. Programming of application is mostly written in C language for controller or processor. Python is an interpreted language and great library source available for BBB. At low level, programming in python is efficient and responds quicker than C language.
LED blinking in Beaglebone Black (Part 3/15)
Let’s start with the explanation of various peripheral interfaces with Beaglebone black. I will begin with a simple external LED blinking with BBB for better understanding of the configuration and usage of GPIO pin. I have chosen the python scripting language for programming but you can write it in any another language also. I have used adafruit python BBB library to make application.It is a simple learning tutorial of Beaglebone black. Here I connected two LEDs with GPIO pin of Beaglebone black.
Switch Interfacing with Beaglebone Black ( Part 4/15)
Beaglebone – switch interfacingThis tutorial explains how to interface switch with Beaglebone black where switch acts as an input device. It is a simple learning tutorial regarding the use of GPIO pin as an input. Program is written in python script with adafruit GPIO library. It is a not a big deal but it’s necessary to clear fundamental before developing high application. It is a simple learning tutorial of Beaglebone black. Here I connected led and switch with GPIO pin of Beaglebone black. When script is being executed, it enters the end of continuous loop.
DC Motor Interfacing with Beaglebone Black (Part 5/15)
This tutorial explains how to interface DC motor with Beaglebone black where DC motor acts as an actuator device. Due to insufficient current, it’s not possible to drive the motor directly from BBB and hence a motor driver IC is needed.Program is written in python script with Adafruit GPIO library.Install the latest python version in BBB as explained in tutorial How to make first python program with Beaglebone Black. Install the Adafruit python-GPIO library named adafruit_BBIO.
Servo Motor Controlling with Beaglebone Black (Part 6/15)
This tutorial explains about the fundamental use of PWM where servo motor is controlled by potentiometer. It is a DC motor which operates on electrical pulse. You can directly interface servo motor with Beaglebone black without any driver IC. For this you have to write a program in python script with adafruit PWM and ADC library.It is a simple learning tutorial in which I have interfaced servo motor and potentiometer with Beaglebone black. When script is being executed, it enters into a continuous loop.
How To Make Your First C Program in Linux (Part 3/15)
Nowadays programming language is getting more popular and is being used in each and every domain. Various applications, software etc. are created by programming. C programming is easy and simple language, which can prove to be a useful choice for a beginner who wants to become a programmer.C language is the basis of all languages and is useful to understand the concept of Linux in brief. Most of the part of Linux kernel is written in C language. So knowledge of C programming helps to understand Kernel program and application.
Linux Command To List Currently Running Processes (Part 5/15)
A file is everything in Linux. When a file is executed, it is understood as a process. Process is created by another process and gets destroyed after being used. Multiple processes can run on Linux system and various commands are specified for management of process. Each process is identified by a unique number called Process-ID (PIDwhich is allocated while the process is created. from the parentPID.If you execute any single command from shell terminal, it also creates a process. Refer the tutorial Process in Linux for more information about process.Here I will explain various process commands which give out the information about running process.
Linux Basic Commands (Part 2/15)
Linux supports both GUI (Graphical User Interface) and CLI (Command Line Interface) environments. GUI is more user friendly for users and it’s easy to point, click and drag without any confusion. You can create folder, file and various operations as per your need and work upon them like window operating system. Traditional UNIX environment supports CLI but not GUI. Command Line Interface is a terminal where you can enter the command to tell computer what to do. You can create file, folder and various operations by entering command in CLI terminal and it is faster and more powerful than GUI. Various Linux distributions make use of similar commands. You need to read various commands before working in Linux with CLI.
Introduction of Linux
Bell Lab laboratories developed advanced OS with highly feature written in C language named UNIX operating system. In 1990, PC were fully powered by UNIX and well featured but not fully open source, then in the year 1991, Linus Torvalds introduced an operating system called Linux which is member of large family UNIX-like OS. Linux is fully customizable free operating system. Due to advent open source feature of Linux, everyone can download the source code of Linux and modify it. It is supported any hardware components. Linux uses only POSIX (Portable Operating System Interface Standards) of UNIX, which is standards specified by IEEE computer society for maintaining compability between OS.
How To Install and Run Arduino In Linux (Part 4/15)
This tutorial explains how to install and run Arduino in Linux distribution such as an Ubuntu. Arduino is already available in the software center of Ubuntu which is one of the repositories of Linux. Ubuntu needs to meet the required dependencies of Arduino. so before installibng Arduino make sure that the dependencies are met.Arduino software is made in java environment and to run the java program, we need to download and install Java run time environment. There is no need of installing java run time if it is already installed in your system.. Since Arduino software already includes java you can install it individually from Ubuntu software center using the following command line from command terminal: Ubuntu needs to meet the required dependencies of Arduino. so before installibng Arduino make sure that the dependencies are met.
Getting started with Beaglebone Black (Part 1/15)
Beaglebone Black aka BBB is a low cost open source development board mainly used by developers and lobbyists. Although it’s quite similar to a Raspberry Pi yet it comes with some additional features. Developed by a non-profit corporation beagleboard.org, this credit card sized board also supports embedded Linux platform. Due to the presence of so many advanced peripherals, it is also considered to be a minicomputer.BBB consists of core architecture of ARM family and houses AM35X ARM cortex A8 (1GHz) processor. It can be powered either through a micro USB port or an external 5V supply that is present as an optional arrangement.
Hello world module programming (Part 24/24)
Linux kernel supports modular approach. It supports insertion and removal of code from itself at a routine. Module is loadable kernel object which we can load and unload during run time. Module is single binary image which contains the information of related subroutine, group, data, entry and exit. Device driver is also one type of module which provides the facilities to reload, debugging, and loading new driver on demand in response to hot plugging of new device. It is allowed to access hardware connected to the system. We can build monolithic kernel using module kernel and new functionality in kernel image. Let’s understand how module would be created and work in Linux. Module is like a simple file and we can save it as C file with .c extension but it is somewhat different. It does not need to write code inside main function.
How to create semaphore in Linux (Part 23/24)
Semaphore is a basic synchronization mechanism and it works as a simple counter which increments on resource allocation and decrements on resource de-allocation. You can refer to the tutorial Semaphore before learning this tutorial. I will explain how to create counting semaphore in Linux. Counting semaphore is non-negative counter. Semaphore count initializes with a number of free resources. Counter value is incremented when resources are added and decremented when resources are released. In C language, semaphore parameter and functions are defined in <semaphore.h> header file. Various operations on semaphore are performed by different functions which are defined in semaphore header file. You can initialize semaphore, lock and unlock, release the semaphore etc.
Semaphore (Part 22/24)
A semaphore is a synchronization mechanism that controls access by multiple processes to a common resource in parallel programming environment. It is widely used to control access to file and shared memory. In computer system it is a variable whose value indicates the status of common resource. Its purpose is to lock resource being used. They are counter used to provide control access to the shared data structure for multiple processes. Operation allocated with semaphore is tested, set and waited. Test and set process is concerned, uninterruptable and can’t be stopped once started. The result of test and wait process is the current value of the semaphore.
Communication between server- client through socket programming using UDP/IP (21/24)
In previous tutorial, I explained about communication between server-client through socket programming. We can also establish server-client communication using UDP/IP. In this tutorial I will explain how communication occurs between server-client through UDP/IP. Before explanation, let’s see some basic view of terminology. Three main things are needed to establish connection between server-client models:1) Transport protocol (TCP or UDP)2) Socket3) IP address and port UDP is a connection-less protocol which stands for user datagram protocol. It is an unreliable protocol but with IP it provides the best communication mechanism
Communication between server- clients through socket programming using TCP/IP (Part-20/24)
TCP is connection oriented protocol which stands for transfer control protocol. It is a reliable and secured protocol. In TCP, receiver can generate the acknowledgement of received packet so sender (client) does need to wait for acknowledgement and if back response doesn’t come or any packet error is generated, it will resend to the client.Socket is end point connection for communication between two machines. It is like data connectivity path between two wireless terminals. Socket is required at both sides of server and client. You can refer to the tutorial socket and How to create socket in Linux.IP address is a unique numerical address of each computer and device. It plays an important role in networking domain with Internet protocol.
How to create Socket in Linux (Part 19/24)
This tutorial will explain about how to create socket programming in C language. Socket is virtual end point communication over the network between two hosts or processes. Refer to the tutorial Socket in Linux before learning this tutorial. You always open the Google page in your web browser but do you know how our web browser accesses the Google page form www.google.com? When you type www.google.com in your web browser, it will open the socket and send the request to server (www.google.com). Server always listens to the request from different hosts. When server receives and accepts the request it sends response back to the host (i.e. Local PC). After establishment of connection, server will send the Google page to our web browser.This tutorial assumes you know about socket in Linux and are aware with C programming language. Linux has standard C library of socket in package named <sys/socket.h> header file. Socket creates file descriptor using the socket ( ) system call.
Socket in Linux (Part 18/24)
I explained an Interprocess communication (i.e. Pipe, named pipe) between two applications or process in system. You might be wondering if two applications available in different machines over the network (i.e. local PC or server), pipe or named pipe are communicated or not? Pipe or named pipe can communicate only those processes which are located in the same system. We can communicate with application which is located in different systems through new communication method named Socket.