The Raspberry pi is a device which uses the Broadcom controller chip which is a SoC (System on Chip). Raspberrypi is provided with a RCA connector which can be used to connect it directly to a TV screen which is based on PAL and NTSC standard. The board also has a HDMI connector output which can be used to connect the board to a HD TV. A board capable of generating graphics on standard display screen needs a perfect application using which the programmers can exploit that capability. The ‘QT’ is a widely used platform for creating GUIs in Linux environment. Qt is an application which helps indeveloping the UI framework using the Qt IDE. Qt uses standard C++ but it also supports support many compilers, including the GCC C++ compiler and the Visual Studio suite.This article explains how to install the QT in Raspberrypi.
How to Use Signal Values and Messages to Read Multiple Inputs- (Part 27/38)
In this particular project a Parent creates only one Childs process which will then create its own Child Processes. The Grand Child Processes of the Parent processes are then used to read the status of the four input pins independently. The Child processes are made to send a signal ‘SIGUSR1’ to their own Parent process whenever the status of the input pin changes. Each Child process sends a different value along with the signals they sent. As soon as their Parent process receives a signal, it reads the value from the signal and sends the status in the form of a message along with a signal to the original Parent process. This forms a Process System made up of 4 Grand Child process, a Child Process and a Parent process where the Parent is free to do its work, but the Child can get the attention of the Parent by sending signal.
How to Read Multiple Inputs using Signal Values-(Part 10/38)
Multi-tasking Operating Systems can run several processes at a time creating and effect of parallel processing with the help of the high speed processor. The Linux Operating Systems provides Multi-User-Multitasking. Linux operating systems especially Ubuntu is preferred for all kind of programming and development. In a multi-tasking environment of the Operating System several processes executes at the same time and the Signals provide an Inter-Process Communication (IPC) method. The Operating System sends signals to the process to notify them about the events occurred along with passing a value or message. The Raspberrypi is a mini-computer board which is powerful enough to run large operating systems like Linux, Mac and Windows. The Linux operating systems like Archlinux ARM, OpenELEC, Pidora, Raspbmc, RISC OS and the Raspbian and also Ubuntu versions are available for the Raspberrypi board. The device which uses the Broadcom controller chip which is a SoC (System on Chip).
How to Send Message between Processes using Signal in Raspberry Pi (Part 25/38)
In a multi-tasking environment of the Operating System several processes executes at the same time and the Signals provide an Inter-Process Communication (IPC) method. The Operating System sends signals to the process to notify them about the events occurred and to control them. A Parent process can create another process, which are called the Child process and the Parent process can use signals to control the Child process. The Child can also send a signal back to the Parent process.The signal is also a means of passing message between independent processes. A signal Handler function inside the process will always get the signal number of the received signals. The Signal Handler function can be set up in such a way that it can receive value or messaged passed along with the signals by the other processes. This article discusses how to send a message along with a signal from one process to another.
How to Send Value Between Processes Using Signal -(Part 24/38)
Linux operating systems especially Ubuntu is preferred for all kind of programming and development. In a multi-tasking environment of the Operating System several processes executes at the same time and the Signals provide an Inter-Process Communication (IPC) method. The Operating System sends signals to the process to notify them about the events occurred and to control them. A Parent process can create another process, which are called the Child process and the Parent process can use signals to control the Child process.The Raspberrypi is a board actually designed for helping computer education for remote schools but it is a good platform for programmers especially beginners to explore various coding techniques. The Raspberrypi is a mini-computer board which is powerful enough to run large operating systems like Linux, Mac and Windows. The Linux operating systems like Archlinux ARM, OpenELEC, Pidora, Raspbmc, RISC OS and the Raspbian.
How to Read Inputs Using Signal in Raspberry Pi -(Part 26/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard.To access the pins that coming out of the Broadcom controller the C library “bcm2835” has been downloaded and installed. There are eight general purpose IO pins on the 13*2 pin connectors of the Raspberrypi board and among them four pins has been selected as input and then remaining four pins as output.
How to Read Multiple Inputs Using Raspberry Pi -(Part 17/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard.To access the pins that coming out of the Broadcom controller the C library “bcm2835” has been downloaded and installed. There are eight general purpose IO pins on the 13*2 pin connectors of the Raspberrypi board and among them four pins has been selected as input and then remaining four pins as output.
How to Use Input Pin of Raspberry Pi-(Part 09/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller the C library “bcm2835” has been downloaded and installed.Each pin of the Raspberrypi board is defined inside the header file <bcm2835.h> which can be included in the C code.
User Signalled Process System in Raspberry Pi -(Part 23/38)
In this project a Parent process creates so many Child process and controls them using the signals. The Parent process creates the Child processes using the fork () function. When the Parent calls the fork (), it always returns a positive value on success. The positive value which the Parent receives is the process-id of the newly created Child process. The Child process however get a value ‘0’ from the same fork () function call.Thus the Parent can store the process-id of each and every Child process that has been created. Using this process-id the Parent process can send a signal to a particular Child process with the help of the function ‘kill ()’. The kill () is a function defined in the header file <sys/signal.h> which can be used to send a specified signal to a specified process.
Self Signalled Process System Using Raspberry Pi -(Part 22/38)
The Multi-tasking Operating Systems can run several processes at a time creating and effect of parallel processing with the help of the high speed processor. The Linux Operating Systems provides Multi-User-Multitasking. Linux operating systems especially Ubuntu is preferred for all kind of programming and development. The operating systems like Archlinux ARM, OpenELEC, Pidora, Raspbmc, RISC OS and the Raspbian and also Ubuntu versions are available for the Raspberrypi board. The Raspberrypi is a board actually designed for helping computer education for remote schools but it is a nice platform for programmers especially beginners to explore various coding techniques.A Parent process can create another process, which are called the Child process and the Parent process can use signals to control the Child process. This project demonstrates the implementation of a Process system in which there is a single Parent and so many Childs and the entire systems operates on the signal received by the Parent process.
Interprocess Signalling in Raspberry Pi -(Part 21/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. A signal is sent for the purpose of notifying the process about something that required immediate attention.
How to Use Timer in Raspberry Pi -(Part 20/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. A signal is sent for the purpose of notifying the process about something that required immediate attention. Different signals are used to notify different events and the signals are differentiated by their signal numbers.
How to Control a Process Through Signal -(Part 18/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. A signal is a software interrupt that can be sent to a process which is currently executing in the Operating System.
Multiuser Multitasking in Raspberry Pi -(Part 16/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. The default user present in the Ubuntu OS loaded in the Raspberrypi is ‘pi’. Creating new users is an easy task using the commands in Ubuntu.
Parallel Programming using Threads -(Part 28/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed.The term ‘Process’ refers to the code which is currently in execution and the term ‘thread’ refers to the small part of that code which the CPU will execute at a particular time.
Installing and Using Pidora OS on Raspberry Pi
What is Raspberry Pi? Raspberry is a new (one year old), ultra small (credit card size), and cheap (35USD), Linux computer. The CPU is an ARM processor at 700MHz with 256 MB (typeA) or 512MB (typeB) of RAM.The flavors of Linux for Raspberry are Debian(Raspbian), Fedora (Pidora), RISC OS 5, Arch Linux ARM (derivate de Arch Linux). All in this article is dedicated to PIDORA. What a Raspberry Pi doesn’t have?Don´t have Hard Disk but have SD Card, which is enough for Raspberry. Don´t have real time clock, but we can make one with ntp (network time protocol) server. Don’t have a case included, you must buy apart.The fact of don´t have mechanical parts, such us fan coolers or hardisk makes Raspberry strongest, with null hardware maintenance, and with very low electrical consumption (It’s Ecological).
Multitasking on Raspberry Pi using Execve and Fork Commands -(Part 15/38)
The term ‘Process’ refers to the piece of code which is currently in execution. The fork () is a function which can be used in the C code to start a new process as a ‘Child process’. The process or the code which is in execution which makes a call to the function fork () is called the ‘Parent process’ and the new process created by the fork () is called a ‘Child process’. The ‘Parent process’ and the ‘Child process’ executes parallel (high speed processor makes it feel like parallel processing) and independently and thus achieves multi-tasking. The fork () most of the time uses the execve () function to create a new process as Child. In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet.
Executing a File using Execve On Raspberry Pi -(Part 14/38)
In an operating system, the user can write so many codes and made them executable and then run each of them as background processes to achieve multi-tasking. The another easy method to achieve the multitasking is using a Shell script in which all the commands to execute the codes as background process are scripted into, but it is not a proper method since the user can have little control over the processes which are initiated by the Shell script.The same thing can be done by executing a single C code in which the system () function opens up a new Shell and pass the commands to them. Since it may open up a new Shell for executing each and every process the better method is to use execve () function in the code which itself can execute a new process.
Multitasking on Raspberry Pi using Single C Code -(Part 13/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached.The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. The Operating system running on the 700Mz processor is powerful enough to do multitasking and hence it can run so many processes in parallel just like the Desktop OS can do.
Multitasking using Shell Script on Raspberry Pi -(Part 12/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. The Shell is a program or an application which accepts the commands entered through the command line searches for the executable files having the same name at some particular directories and executes them.