In the previous tutorial, we discussed serial communication protocols available on Raspberry Pi. We discussed the terminology of data communication and defined the terms like ‘port’, ‘bus’, ‘interface’, ‘protocol’ and ‘standard’. We talked about UARTs on Raspberry Pi and how these UARTs are referenced by different serial Linux device names when they are accessed through…
RPi Python Programming 17: Serial communication using UART protocol
In the previous tutorial, we learned how to generate analog output in the form of software PWM when using Raspberry Pi (RPi). We also showed how software PWM can be used to fade an LED. The PWM output can also be used for other applications, such as for speed control of a DC motor or…
RPi Python Programming 16: Analog output and software PWM
In the previous tutorial, we learned how to use digital input with Raspberry Pi. Raspberry Pi (RPi), as an embedded computer, is capable of digital input, digital output, pulse width modulation (PWM), and the implementation of several serial communication protocols (such as UART/USART, I2C, and SPI). In this tutorial, we’ll cover analog output by using PWM with…
RPi Python Programming 15: Interfacing a push button & digital input
In the previous tutorial, we discussed how to use a digital output on Raspberry Pi. We designed a GUI-controlled LED driver, demonstrating how single-board computer features — like high-level language (HLL) such as Python — can control embedded applications. Microcontroller-based embedded applications are typically programmed in low-level languages, such as in Assembly Language or embedded…
RPi Python Programming 14: GUI-controlled LED driver
In the previous tutorial, we covered TTK menus, layout management in the Tk GUI toolkit, and mouse and keyboard events in Tkinter/TTK. We also discussed multi-threading in Python and created our own class of a threading package. This means we can implement our Raspberry Pi (RPi) codes exactly as if they are running on a…
Top 11 applications of Raspberry Pi
Raspberry Pi is an amazing credit card-sized development board that can serve varied purposes for hackers, hobbyists, artists, as well as students. One of the most versatile application boards, it is believed that it can only be used for some common programming purposes especially the ones related to IoT or AI. In this blog, we will be breaking that myth and show you the versatility of this system and how it can make a difference to our lives in a long run. Let’s get on with it then.
RPi Python Programming 13: TTK menus, layout management, events & multi-threading
In the previous tutorial, we covered Tkinter and TTK widgets. With the help of these widgets, we’ll create user interfaces to control embedded electronics. We have already created a blank GUI window for our Raspberry Pi (RPi) embedded electronics control app. In this tutorial, we’ll learn about TTK menus and create one for our RPi…
Arduino Vs Raspberry Pi: How to select between the two?
This is a common dilemma among electronics community of engineers whether they are DIY hobbyists or professionals working on a prototype. There may be a case that one might have worked on some microcontrollers and now willing to propel the academic excellence by working on development boards or do one needs to choose a development board for a do-it-yourself engineering project. Let’s have a fundamental understanding of both the boards to make clear which to select.First thing is that both Arduino and Raspberry Pi offer a range of development boards with different specifications and features.
Web Server using Python- (Part 8/12)
In this project the Raspberrypi board is booted with the Ubuntu OS and is connected to the Ethernet port of a Windows7 PC. The board is connected to the internet connection as explained in the project Connecting the Raspberrypi to the internet. The IP address of the Raspberrypi board has been obtained to remote login in the TUI using the PUTTY and is remotely accessed using VNC.In this tutorial we use a Python web framework called Flask to create a dynamic web server in Raspberry Pi. While there’s a lot you can do with Flask “out of the box,” it also supports many different extensions for doing different operations such as user authentication, generating forms, and using databases.
Snake game- (Part 6/12)
In this project a Raspberry Pi board is booted with Ubuntu OS and is connected to the Ethernet port of a Windows7 PC. The board is connected to the internet as explained in the project how to connect the Raspberry Pi to the internet. The IP address of the Raspberrypi board has been obtained to remote login in the TUI using PUTTY and is remotely accessed using VNC.
How to run a python code on boot- (Part 7/12)
This article is to provide step by step instructions to run a Python code in the boot of Raspberry Pi automatically. Sometimes we may want to run a Python script when Raspberry Pi boots up, like Webserver applications need an auto start of the server so that remote access is possible. There are a number of different techniques to do this, one of those is crontab. A crontab is a job scheduler that allows the system to perform tasks at defined time or intervals. It is a very powerful tool and useful in lots of situations. You can use it to run commands in the boot or a python script in this case.
Controlling Hardware using GUI in Raspberry Pi -(Part 32/38)
The Graphical User Interface (GUI) helps the user to communicate with the system effortlessly. The GUI is considered as the front end of an application. In a Linux operating system each hardware device is represented as a file. The device can be controlled by simply reading and writing into that file. The hardware of an operating system is on the one side and the user trying to access the hardware is on the other side, and in between them there might be several layers of process running which communicates each other using inter process communication methods. The GUI is the process which the user can use to communicate with all these process layers and finally communicate with the Hardware. This project demonstrates how to create a GUI using the QT which can control the LEDs connected to the Raspberrypi board.
How to Control Hardware using Named Pipe – (Part 34/38)
In a Linux operating system all each hardware device is represented as a file. The device can be controlled by simply reading and writing into that file. The hardware of an operating system is on the one side and the user trying to access the hardware is on the other side, and in between them there might be several layers of applications running which communicates each other using inter process communication methods. This project demonstrates how to control a process which can turn on and off the LEDs of the Raspberrypi with the help of another process by writing into a pipe file. The Raspberrypi is a mini computer which can be used to learn and experiment the concept and working of an Operating System. The Raspberry pi is a device which uses the Broadcom controller chip which is a SoC (System on Chip). This SoC has the ARM11 processor which runs on 700 MHz at its core.
How to Get GUI on Raspberry Pi – (Part 04/38)
The Raspberry pi is a single board minicomputer which comes without input and output units, but with connectors for them. The board is designed to be easy to use and available at the least possible price. The main intention of releasing such a board is to provide computer education to the remote schools where the PCs are not very commonly used. The idea is to use the TV screen as the display unit for the Raspberry pi board and hence converting the TV into a computer. The board is hence 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, but there is no VGA connector.
Named Pipe Example Using Raspberry Pi – (Part 33/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. There are different kinds of Inter Process Communication (IPC) system and the Named Pipe is one of the simplest of them. The Named Pipe is actually a temporary file having a particular name and stored at a particular directory whose name and location are known to the processes which needs to communicate with each other. The Named Pipe is also called First In First Out (FIFO).This project demonstrates how two programs communicate each other using named pipe. In this project a simple program is written which creates a pipe and continuously checks for any data on the pipe. The data is written to the pipe by simply using terminal commands. As soon data appears on the pipe, the program reads it and prints back on the terminal.
How to Create Buttons in Qt- (Part 31/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. Downloading and installing the fourth version, QT4 using commands are already discussed in a previous article. There is another article which discusses about how to start with programming in QT, a hello world program using QT. Once the installation is complete the user can find them listed under the installed programs for ‘Programming’. The list includes “Qt 4 Assistant”, “Qt 4 Designer”, “Qt 4 Linguist” and “Qt Creator”. The “Qt 4 Assistant” is basically provides help in the form of documentations related to the topics in QT. “Qt 4 Designer” is where the user can create a design and save it as a ‘.ui’ file which can then be used in QT projects. The “Qt 4 Linguist” provides a language view of the design created.
Hello World Program using Qt in Raspberry Pi- (Part 30/38)
The Raspberrypi board is powerful enough to run large operating systems like Linux, Mac and Windows. Linux operating systems especially Ubuntu is preferred for all kind of programming and development.The board 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.
How to Install Qt in Raspberry Pi- (Part 29/38)
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).