Tweeting on Raspberry pi 4

Welcome to the next tutorial of our Raspberry Pi programming course. Our previous tutorial taught us to configure our raspberry pi for voice control. We also discussed some methods of reducing vexing noises so that the voice command program understands you. However, in this lesson, we will learn how to tweet from Raspberry pi.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Raspberry Pi 4AmazonBuy Now

What will we learn?

Assume you wish to add tweeting into a Raspberry Pi software you're developing. This article will show you how to build a Twitter app, get access privilege tokens, and post a tweet. On our Raspberry Pi, we'll make a simple program that tweets the result of the uptime command. This is a made-up example, but it demonstrates what is needed to tweet from a raspberry pi.

For this session, a repo has been set up. Because we'll be referring to code within the repository, cloning it will be helpful. You could use this program as a reference point for your programs or copy the components you need.

Let's start by installing git with the command below.

We're going to clone the repository into our current working directory now:

After that, change the directory into the repository.

The Twitter Application programming interface requires that all queries use OAuth for authentication. To access the Application programming interface, you must first create the authentication credentials. Four text strings make up these credentials:

  • Consumers keys
  • Consumers secrets
  • Login Tokens
  • Login Secrets

If you're a Twitter account, go through the procedures below to get the keys, tokens, and secrets. If you don't have a Twitter account, you'll need to establish one first.

Step 1: To become a Twitter Developer, fill out the form below.

Visit Twitter's developer site to sign up for a new account. You must now select the Twitter subscriber in charge of this account. It's most likely going to be yourself or your company. This is how this page appears:

After that, Twitter asks you questions about whatever you want to utilize the developer's account, as seen below:

You must specify the developer account's username and whether it will be used for commercial or personal purposes.

Step 2: Create an application

Apps and not accounts have access to Twitter's authentication credentials. Every tool or program that uses Twitter's API qualifies as an app. To perform API calls, you must first register your application. Navigate to the Twitter applications page and click on the option to create an application to register the app.

The following details regarding your application and its aim must be provided:

  • App name: a name that will help people remember your app (such as examplebot)
  • The objective of your application is described in the application description
  • Uses of the app: how customers will utilize your application
  • The uniform resource locator of your app's website is required; however, it could be a personal website's URL because bots do not require a URL to function.

Step 3: Create your Credentials for Authentication

Navigate to your Twitter applications page to generate the authentication credentials. This is how the Apps page looks:

The Details button for your app can be found here. After hitting this button, you'll be sent to the following page, on which you can obtain your credentials. You could generate and copy the keys to use in your code by selecting the Keys and Tokens tab:

Save the credentials after you've generated them to use them later in your code.

The following snippet can be used to test the credentials:

How can we set the app permissions?

Ensure that the "Read, access, and write direct message" is ticked in the "Permissions" section.

How can we Install Tweepy?

Tweepy is a Library for python for utilizing the Twitter API, and it's included in the requirements.txt document, so all you have to do is:

How does tweepy work?

Tweepy is a library that simplifies the Twitter application programming interface. Tweepy is a collection of functions and classes that mirror Twitter models and application programming interfaces, and it handles implementation details discreetly, such as:

  • Decoding and encoding of data
  • Hypertext transfer protocol requests
  • Results paging
  • Authentication
  • Rate restrictions
  • Streaming

If you didn't use Tweepy, you'd have to deal with low-level features like hypertext transfer protocol, data encoding, authorization, and speed limits. This may consume a lot of time and is subject to mistakes. Tweepy allows us to concentrate on the functionalities we wish to implement.

Tweepy can be used to access the Twitter application programming interface features. Let's have a simple example to see what we're talking about.

The example command below will download all of your tweets from your timeline and output each one to the console. Twitter mandates that all requests be authenticated using OAuth. Tweepy makes using OAuth simple for you. We'll need to establish an account for our application to get started. Build a new app, and when it's done, you should get your authentication token and secret. Keep these two with you at all times; you'll need them.

Next, create an instance of OAuthHandler. We enter our user token and secret, which we received in the previous line, into this:

If you're utilizing a callbacks uniform resource locators that need to be given dynamically in a web application, you will pass it in like this:

If the callback uniform resource locator isn't going to change, it's preferable to put it up as static on Twitter when creating your app.

Unlike basic authentication, we must first perform the OAuth "dance" before we can use the API. The steps below must be completed for this:

  • Redirect the user to the Twitter account to approve our application by obtaining a request tokens from Twitter
  • Twitter sends the user to our website whenever a callback is used. Otherwise, the user will have to enter the verification code manually.
  • Substitute an access token for the authorized request token.

So, to start the dance, let's get our request token:

This call asks Twitter for a token and then provides the authorization uniform resource locator, to which the user should be redirected to approve us. Simply keeping our OAuthHandler object alive till the user returns is sufficient. In a web app, a callback will be used. As a result, the request token must be saved in the session because it will be required in the callback uniform resource locator request. A fictitious example of saving the request tokens in a session is as follows:

As a result, we can now redirect the visitor to the uniform resource locator returned by our authorization URL() function.

If it is a desktop program (or any other software that doesn't employ callbacks), we'll need to ask for the "verifier code" that Twitter will provide after they have authorized us. This verifying code is sent in the callback query from the Twitter account as a GET query argument in the URL within a web application.

The request token is then exchanged with an access token in the last phase. The access token is the "key" to the Twitter Application programming interface treasure chest. To obtain this token, we must perform the following steps:

It's good to keep the access token on hand if you need it later. It is not necessary to fetch it every time. Because Twitter does not currently expire tokens, they would become invalid only when the user revokes our application's access. Your application determines the location where you store the authentication token. Essentially, you must save two string values: secret and key:

You can save these in a database, a file, or wherever else your data is stored. To re-create an OAuthHandler using this cached access token, follow these steps:

Since we have an access token for our OAuthHandler, we can move on to the following step:

Tweet python code

How is API used in this library?

The application programming interface class gives you access to the Twitter RESTful API's entire methods. Each method can take different parameters and provide different results. The API methods are classified into the following groups:

User timeline methods

These ways allow you to read mentions, tweets, and retweets on your timeline and any other public user's timeline.

Tweet methods

These methods deal with tweet creation, retrieval, and retweeting. Tweepy is used in the following code to produce a tweet with specific text:

Users’ methods

The functions in this group may be used to retrieve users using a filtering criterion, extract user data, and show followers for each user so long as the account is public.

Follower methods

This set of routines includes methods for following as well as unfollowing persons, requesting followers for a user, and displaying the profiles a user is following.

Account methods

Using these methods, you may write and view your profile information. This code sample might be used to change your profile information, for example:

Likes method

You can designate any twitter message as Liked or delete the Like tag if it has already been added using these API calls.

Blocking user method

This collection of methods includes unblocking and blocking members and a list of blocked users. You can view the users you've blocked in the following way:

Search methods

You may search tweets using these methods using language, text, and other filters. For instance, this code will return the ten latest public tweets in English that contain the term "Python":

Trend methods

This set of tools allows you to generate a list of the most recent developments for any place. Here's how to construct a list of worldwide hot issues, for example:

Streaming methods

Streaming enables you to actively monitor tweets in real-time for those that meet particular criteria. This indicates the program waits for the latest tweet to be produced before processing it if no other tweets satisfy the requirements.

You must construct two objects to use streaming:

  1. The stream object retrieves tweets that meet certain criteria using the Twitter API. A streaming listener receives tweets from this source.
  2. The streaming listener receives the tweets from the stream.

This is how you do it:

How about models?

Most of the time, when we call an API method, we'll get a Tweepy class model object back. This will hold Twitter's data, which we can use in our program. The following code, for example, returns a user model:

The following are the model classes:

  1. Users
  2. Statuses
  3. Friendships
  4. Search Result

Let's assume you want to obtain a list of all the tweets that mention you, then like each one and follow the author. This is how we can go about doing it:

Since every tweet object given by the mentioned timeline() belongs to the Statuses class, you can use the following syntax:

  • favorite() to make it a favorite
  • favorite() to make it a favorite

Tweet.user property is also a user object. Follow() may add the author of that tweet to the list of individuals to follow. Using Tweepy models allows us to write concise and understandable code.

What is next after setting up our app?

Maybe we can put a motion detector and a camera on our cat and tweet images of it. Alternatively, we could set up a temperature sensor and tweet some weather-appropriate status updates. We can also leave the repository unchanged and tweet the uptime command if we only want others to know our pi's load average.

Conclusion

You may take the Twitter presence to another level by creating your personal Twitter bots. You may use bots to automate content generation and other Twitter tasks. This may save time and provide a better user experience for your viewers. The Tweepy library hides numerous low-level Twitter application programming interface details, allowing you to concentrate on the logic behind your Twitter bots.

In this tutorial, we learned how to set up our tweeter app on our Raspberry pi. We also learned how to generate access tokens, set up our app's permissions, and send a tweet. However, In the following tutorial, we will learn how to print on a Raspberry pi.

Voice Control Project using Raspberry Pi 4

Welcome to the next tutorial of our Raspberry Pi programming course. Our previous tutorial taught us to make a button-controlled "music box" that plays different sounds depending on which buttons are pressed. In this lesson, we will configure our raspberry pi for voice control.

Where To Buy?
No.ComponentsDistributorLink To Buy
1BreadboardAmazonBuy Now
2DC MotorAmazonBuy Now
3Jumper WiresAmazonBuy Now
4Raspberry Pi 4AmazonBuy Now

What will you learn?

Like the Amazon Echo, voice-activated gadgets are becoming increasingly popular, but you can also construct your own with a Raspberry, a cheap USB mic, and some appropriate software. Simply speaking to your Raspberry Pi will allow you to search YouTube, view websites, activate applications, and even answer inquiries.

What will you need?

Because the Raspberry Pi lacks a soundcard or audio port, this project requires a USB microphone or a camera with a built-in microphone. If your mic only has an audio jack, look for an affordable USB soundcard that connects to a USB port on one side and has a headphone and mic output on the other.

Getting started

For the Raspberry Pi, there are various speech recognition programs. We're utilizing Steve Hickson's Pi AUI Toolkit for this project since it is powerful and straightforward to set up and operate. You may install a variety of programs using the Pi AUI Suite. The first question is whether or not the dependencies should be installed. These are the files that the Raspberry Pi requires to work with voice commands, so pick Yes, then press Enter to agree.

Following that, you'll be asked if you wish to download the PlayVideo software, which allows you to open and play video content using voice commands. If you select Y, you'll be prompted to enter the location of your media files, such as /home/pi/Videos. It's worth noting the upper-case letters are crucial in this scenario. The application will tell you if the route is incorrect.

Next, you'll be asked if you wish to download the Downloader application, which explores the internet for files and downloads them for you automatically. If you select Yes, you will be prompted to enter an address, port, password, and username. If you're not sure, press Return to choose the default settings in each scenario for now.

Install the Google Texts to Speech Service if you require your raspberry pi to read the contents of the text files. Since it communicates to Google servers to translate text into speech, the Raspberry Pi must be hooked up to the internet to utilize this service.

You'll require a google user account to install this. The installation requests your username—press Return after completing this step. The Google password is then requested. Return to the previous page and type this.

You may also use the installer to download Google Voice Commands. This makes use of Google's speech-to-text technology. To proceed, you must enter your Google login and password once again.

Regardless of whether you choose Google-specific software or not, the program will ask if you wish to download the YouTube scripts. These technologies allow you to say something like "play pi tutorial," An appropriate video clip will be played—press Return after typing a new welcome. You can also enable the silent flag to prevent the Raspberry Pi from responding verbally.

Lastly, the software installs the Voice command, which includes some of the more helpful scripts, such as the ability to deploy your internet browser by simply saying "internet."

Basic voice commands used

Youtube: When you say "YouTube" followed by a title tag, a youtube clip of the first related YouTube clip appears. "I'm feeling lucky" is comparable to "I'm feeling lucky" on google. Say "YouTube" followed by the title of the video you want to watch, for example, "YouTube fluffy kittens."

Internet: Your internet browser is launched when you use the word "internet." Midori is the internet browser for Rpi by default, but you may alter that.

Download: When you say "download," followed by a search query, the Pirate Bay webpage searches for the files in demand. For instance, you can say "Download Into the badlands" to get the most current edition of the movie.

Play: This phrase utilizes the in-built media player to open an audio or video file. For instance, "Play football.mp4" would play the file "football.mp4" from the media directory you chose during setup, like /home/pi/movies.

Show me: When you say "show me," a directory of your choice appears. The command defaults to not going to a valid root directory, so you'll need to modify your configuration so that it points to one. For instance, show me==/Documents.

You'll be asked if you want the Voice command to set things up automatically. If an issue occurs at this point, run the following command to download and install the required software.

Configuring the Raspberry Pi master voice

After installing the Voice command application, you may want to perform a few basic adjustments to the setup to fine-tune it. Execute the following command from your Raspberry Pi's Terminal or via SSH.

Following that, you'll be asked several yes/no questions. The first question is whether you wish to enable the continuous flag permanently. The Voice command application, in clear English, asks if you would want to listen to your voice commands constantly every time you launch it.

For the time being, choose Yes. After that, you'll be asked if you wish the Voice command application to set the verify flag permanently. If you select Y, the application will expect you to pronounce your keyword (the default setting is "Pi") before responding to requests.

If you like the RPi to monitor continually but not act on all words you say, this is a good option.

The next step asks if you wish to enable the ignore flag permanently. If Voice command receives a command that isn't expressly listed in the config file, it will try to find and launch a program from your installed apps. For example, if you say "leafpad," a notepad tool, the Voice command looks for it and starts it even if you don't tell it to.

This is a functionality that we would not recommend anyone to enable. Because you're using Voice command at the SuperUser level, there's a significant danger that you'll accidentally issue a command to the Raspberry Pi that will harm your files. If you wish to set up other programs to function with the Voice command, you can update the configuration file for each scenario.

The voice command afterward asks if you want to permanently enable the silence flag so that it doesn't respond verbally whenever you talk. As you see fit, select yes or no. After that, you'll be prompted to adjust the default voice recognition timeframe. If Pi is having problems hearing your commands, you should modify this.

If you select Yes, you'll be prompted to enter a number; this is the number of seconds that the Raspberry Pi will listen for a voice command; the default for RPI is 3. The application then allows you to customize your text-to-speech choices. Before you do this, make sure your volume is turned up. The application attempts to speak something and then asks if you heard it.

When the system receives your keyword, it responds with "Yes, sir?" as the default response. To modify this, select Yes in the following prompt, then enter your chosen response, for example, "Yes, ma'am?" Once you're finished, hit the enter key. The program will replay the assigned response to check that you are satisfied with the outcome.

Whenever the program receives an unidentified command, the method is the same as the default response. "Received the wrong command" is set as the default response, but you could still alter it to something more friendly by typing yes, then your desired response, like, "The command is not known."

You now have the option of configuring the voice recognition parameters. This will check to see if you have a suitable mic. The Pi will then ask you if you want it to test your sound threshold using the Voice command.

Check for background sound, then press Yes, then press enter key. It then requests you to say a command to ensure that it is using the correct audio device. Type Yes to have the application automatically select the appropriate audio threshold for your Rpi.

Lastly, the Raspberry Pi will ask if you wish to modify the default voice command term ("Pi"). After that, type Y and your new keyword, then press enter when you're finished.

After that, you'll be requested to say your keyword to acclimate the RPi to your voice. If everything looks good, press Y to finish the setup. Start with the fundamental commands outlined above when using the Voice command software.

Once you've mastered these commands, use the following line of code to exit the application and, if desired, change your config file.

Vexing sounds and how to get rid of them

The Raspberry Pi's technology is still a work-in-progress, so not everything you speak may be recognized by the program.

Stay near the mic and talk slowly and clearly to maximize your chances of being heard by the program if you still have difficulties understanding. Launch the terminal or log in through SSH to your Raspberry Pi and type the following command to access your audio settings to change your audio preferences.

Hit the F4 button on the keyboard to select audio input, then the F6 key to exit. Select your input device, the mic with the arrow up or down keys, then press Enter key. To change the mic's volume, push it up using the up-arrow key to maximum (100).

If your device isn't identified at all, it may require more current than a universal serial bus port on a Raspberry Pi can supply. A powered universal serial bus hub is the ideal solution for this.

 

If you have difficulty connecting after installing the Download application, please ensure that connection to The Pirate Bay site is not limited.

To download the files, you'll also require a BitTorrent application for your RPi, such as transmission. To install this, launch your terminal or access your RPi through SSH and type the following command:

The Transmission homepage has instructions about getting started and utilizing the application. You should always download files that have permission from the copyright holder.

Please remember that whatever you speak and any text documents you provide are transferred to Google servers for translation if you use Google text or speech Commands.

Google maintains that none of this information is kept on its servers. Even if this is the case, any data communicated through the worldwide web can be decrypted by any skilled third party or a hacker. Google, however, encrypts your connection to minimize the risk of this happening.

If you like this voice command tool, you might want the program to launch automatically every time the Rpi is powered on. If this is the case, launch the terminal from your RPi or access it via SSH and execute the command below:

The above command opens the script that controls which programs run whenever your Raspberry Pi is booted. By default, this script is doing nothing. Type the following line of code directly above the one reading exit 0:

To save any changes, use Ctrl+X, enter yes, and press enter key. At this point, you can restart the Raspberry Pi to ensure that it is working.

Launch your Rpi terminal, type the command below, and press enter to see a list of active processes.

How can we reduce vexing noise?

Noise from air conditioners and heaters can damage your audio and make it impossible for the program to understand what you're saying. The only other alternative is to turn these systems off during recording unless the entire system is redesigned to be more acoustically friendly. However, upon listening to the audio, it becomes clear and annoying.

Computer hardware cooling fans are also sources of mechanical noise. These can be disabled manually and for a limited period. Besides that, try isolating the disturbance in another space or utilizing an isolation box as an alternative.

Conclusion

We learned how to configure our raspberry pi for voice control. We also looked at a few basic commands used to control the raspberry pi and the software used. However, In the following tutorial, we will learn how to tweet on Raspberry pi.

Build a GPIO Soundboard in Raspberry Pi 4

Welcome to the next tutorial of our Raspberry Pi programming course. In our previous tutorial, we learned how to create a timelapse video with still images and understand how phototimer and FFmpeg work. In this lesson, you'll make a button-controlled "music box" that plays different sounds depending on which buttons are pressed.

Where To Buy?
No.ComponentsDistributorLink To Buy
1BreadboardAmazonBuy Now
2Jumper WiresAmazonBuy Now
3Raspberry Pi 4AmazonBuy Now

What you will learn

Connect button pushes to function calls using the Python gpiozero package and uses the Python dictionary data structure

Components

  • Raspberry Pi
  • Breadboard
  • Buttons
  • Jumper wires
  • Speaker

Set up your project

For this project, you'll need some audio samples. On Raspbian, there are many audio files; however, playing them with Python can be challenging. You can, however, transform the audio files to a more simply used format for Python.

Please make a new folder and rename it because all of your project files will be saved in the new location.

Copy the sample sounds

Create a new folder named samples using the same technique as before in your new folder.

In /usr/share/sonic-pi/sample, you'll find a bunch of sample sounds. These sounds will be copied into the samples folder in the following phase.

Open the command window by selecting the icon in the upper left corner of your screen.

To transfer all items from one folder to another, execute the following lines:

You should now see all the .flac audio files inside the sample folder.

Convert the sound files

To use Python to play sound files, you must first convert them from .flac to .wav format.

Go to the sample folder inside a terminal.

How can we converting the media files?

FFmpeg is a software program that can quickly transcode video files on Raspberry Pi. This comes preloaded on the most recent Raspbian releases.

You may use this simple command to convert music or movie files format:

To transform an audio (.wav) to a mp3 format (.mp3), for example, type:

Running batch operations on a file using bash

What are batch operations?

A batch operation is a process for processing or treating a large quantity of material. When creating modest amounts of goods, the batch operation is preferred. Because this procedure provides superior traceability and flexibility, it is highly prevalent in pharmaceutical and specialized chemical manufacturing.

It's simple to rename a file with bash. For example, you may use the mv command.

But what if you had a thousand files to rename?

When you run a script or a series of commands on several files, this is known as a batch operation.

  • Try your first simple batch process with any directory containing a few files. The first thing you should do is try something simple.

The first step is to notify bash that you wish to work with all the files inside the folder.

  • f will be used to denote each directory listing inside the folder individually.
  • After that, you must instruct bash which operations to perform on each file. The file name should be echoed to standard output in this scenario.

The dollar symbol indicates that you're referring to f in this case. Finally, inform bash that you're finished.

If you press enter after each statement, bash will wait until you input done before running the loop; therefore, the command would appear as shown below:

You might also use a semi-colon to separate the instructions rather than pressing Return after every line.

How do we manipulate strings?

The process of processing and analyzing strings is referred to as string manipulation. It entails several processes involving altering and processing strings to utilize and change their data.

That final command was meaningless, but batch operations can accomplish a lot more. You can use the following command to rename each file.

  • If you run ls in the terminal, you'll notice that all files will be renamed. So, how did it all come together?
  • The first portion of the f inside *.txt instructs bash to do the action on all files ($f) with the.txt extension.
  • The command does mv $f instructs bash to relocate each file. After that, you must tell bash what the new name of the relocated file is. To do so, delete the.txt extension and replace it with .md. Fortunately, bash includes an inherent operator for removing string ends. Please take a look at this sample to understand how it works.
  • At this point, you may add something more to the string's end.

As a result, the $f percent.txt.MD syntax replaces all.txt strings with .md strings. Use the hash operator instead of the % sign to remove a string from the beginning rather than the end.

Write the following lines in your terminal. All .flac files will be converted to .wav files, and the old ones will be deleted.

Based on the Raspberry version you're using, it might take a couple of minutes.

All of the new.wav files will then be visible inside the sample folder.

How do we play sounds using python?

After that, you'll begin writing Python code. You can do this with any code editor or IDE, but Mu is often an excellent option.

To begin building the components for your musical instrument, you'll need to see if Python will play any of the audio files you've copied.

To play audio files, import and initialize the pygame library.

This file should be saved in the gpio-music-box directory.

Select four audio files to utilize in your composition, such as:

Then make an object which references an audio file. Give the file a different name. Consider the following case:

For the following three sounds, create labelled objects.

Hint

Because all of your audio files are in the sample folder, the path will be as follows:

Each audio object should be given a name, for example, cymbal:

This is how your program should appear:

Please make a backup of your code and execute it. Then use the .play() function inside the shell from the code editor to play the audio.

Ensure that the speaker is functional and the volume is cranked up if you don't hear anything.

Connect your buttons

Four pushbuttons will be required, each connected to a different GPIO pin.

There are 26 GPIO pins on a Raspberry Pi. You may use them to transmit on/off pulses to/from electrical components like Led, actuators, and switches.

The GPIO pins are laid out as below.

There are extra pins for 3.3 V, 5v, and Grounded connections and a number for each pin.

Another illustration of the pin placement may be seen here. It also displays some of the unique pins that are available as options.

A figure with a quick explanation is shown below.

How can we use a button with a Raspberry Pi?

One of the basic input components is a button.

Buttons come in various shapes and sizes, with two or four legs, for example. Flying wire is commonly used to link the two-leg variants to a control system. Four-legged buttons are usually put on a breadboard.

The illustrations below illustrate how to connect a Raspberry Pi to a button. Pin 17 is indeed the input in both scenarios.

The breadboard's negative rail may be connected to a single GND, allowing all pushbuttons to share the same grounded rail.

On the breadboard, attach the four buttons.

Connect each pushbutton to a GPIO pin with a specific number. You are free to select whatever pin you prefer, but you must recall its number.

Hint

Connect one Ground pin to the breadboard's neutral rail. Then connect one of each button's legs to this rail. Finally, connect the remaining buttons' legs to separate GPIO pins.

Here's a wiring schematic that may be of use. The extra legs of the pushbuttons are connected to Pin 4, pin 17, pin 27, and Pin 10 in this case.

Play sounds at the press of a button.

A single pushbutton has been connected to pin 17 in the figure below.

The button may be used to invoke methods that don't need any arguments:

First, use Python language and the gpiozero library to configure the button.

The next step is to design a function with no parameters. This straightforward method prints the phrase Hello in the terminal.

Finally, build a function-calling trigger.

You can now see Hello displayed in the terminal each time that button is clicked.

You may make your function as complicated as you want it to be, and you can also call methods which are part of modules. In this case, hitting the button causes an LED in pin 4 to turn on.

The application should execute a function like drum.play() whenever the button is pushed.

However, brackets are not used when using an action (like a button push) to invoke a function

. The software must call that method whenever the button is pushed, not immediately. All you have to do is use drum.play in this situation.

First, establish one of the buttons. Ensure to replace the numbers from the example with the ones of the pins you've used.

Add the following line of code at the end of your script to play the audio whenever the button is pushed:

Push the button after running the software. If you don't hear the sound, double-check your button's connections.

Add code to the three remaining buttons to have them play their audio.

For the second button, you may use the code below.

How can we improve our script?

Good code is clear, intelligible, tested, never overly convoluted, and does the task at hand.

You should be able to run your code with no issues. However, once you have a working prototype, it's typically a good practice to tidy up your code.

Subsequent stages are entirely optional. If you're satisfied with your writing, leave it alone. Follow the instructions on this page and make your code a little cleaner.

Instead of creating eight individual objects, you may keep your pushbutton objects and audio in a dictionary. These are, nonetheless, the seven characteristics of good code.

  1. Readability

If you're writing one-time discard code that no one, including yourself, will have to see in the future, you may write in any way you like. However, the majority of useful software that has been produced has to be updated regularly.

  1. Scalable

The next important feature of excellent programming is scalability, or the capacity to expand with the demands of your organization. Scalability is primarily concerned with the code's efficiency. Scalable code doesn't always require frequent design changes to maintain performance and resolve various workloads.

  1. Testable

Last-minute adjustments are unavoidable while developing software. It will be difficult to send new changes through if the code can not be rapidly and automatically tested.

  1. Meet functional requirement

Every piece of software that is built has a certain goal in mind. For persons familiar with the functionality, a code that adheres to its requirements is simple to understand. As a result, one important characteristic of excellent code is that it meets the functional requirements.

  1. Gracefully fails

Mistakes and flaws are an inherent element of software development. You can't anticipate every conceivable manufacturing case, no matter how cautious you were during the design process. You should, however, shield your application against the negative effects of such situations.

  1. Extendable

This is an important feature of excellent coding. A reusable and sustainable code is extendable. You write code and double-check that it works as expected. Extensions and related advances can be added to the feature by modules that require it.

  1. The Code Is Reusable

For every software application, reusable coding is essential and highly beneficial. It aids in the simplification of your source code and avoids redundancy. Reusable codes save time and are cheaper in the long term.

Learn how to create simple dictionaries and iterate over them by following the methods below.

First, establish a dictionary where the Buttons serve as keys and audio as values.

Whenever the pushbutton is pressed, you can loop through the dictionary to instruct the computer to play the audio:

Conclusion

We learned how to make a "music box" with buttons that play sounds depending on which button is pushed in this lesson. We also learnt how to interface our raspberry pi with buttons via the GPIO pins and wrote a python program to control the effects of pressing the buttons. In the following tutorial, we will learn how to perform a voice control on Raspberry pi.

How to Create a Time-Lapse Animations with Raspberry Pi 4

Welcome to the next tutorial of our Raspberry Pi programming course. Our previous tutorial looked at how to Interface DS18B20 with Raspberry Pi 4. This tutorial will teach us how to create a time-lapse video with still images and understand how phototimer and FFmpeg work.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Raspberry Pi 4AmazonBuy Now

What is time-lapse?

When photographing something over a lengthy period, "time-lapse" comes to mind. A video can be created by mixing the still photos. Plant development may be tracked with time-lapse movies, as can the changing of the seasons. They can also be utilized as low-resolution security cameras.

Components

  • Raspberry pi 4B
  • Pi camera

Connect to the Raspberry Pi

Cameras that can be used with the Raspberry Pi are a bit limited. A powered USB hub is required for most webcams that are compatible. For this post, we’ll be using a camera specifically made for the Raspberry Pi. The camera module can be plugged into a specified port on the Raspberry Pi. How to do it;

  • Turn off the pi

Shutting down the pi is recommended before adding a camera. A power button should be installed on Pi 4 so that you may shut down the device safely every time.

  • Locate the camera port and lift the tabs to install the camera's cord.
  • Secure the tabs on the flex cable after inserting it into the flex cable slot.

Slide the cord into the port by using an image as a guide. Finally, press down tabs, securing the cable to the motherboard.

Enable the camera in Raspberry Pi OS

Click on the main menu button, select Preferences, and then click Pi Configuration if you're using a monitor. Enable the camera by clicking on the Interfaces tab.

To continue, headless users must type the command below. Make sure the camera is turned on in Interfacing Options. Rebooting the Raspberry Pi will be required.

How to record time-lapse images

Individual stills are used to create time-lapse videos. We'll be using raspistill to acquire our time-lapse images. As part of the Raspberry Pi OS, you don't need to install anything extra. The are two way to record a time lapse:

  • Using the raspistill tool on the Rpi alone
  • Using phototimer
  1. Using the Raspistill tool only

Raspistill is a Linux-based software library that aims to make it easier for Linux users to use sophisticated camera systems. We can use open-source programs running on ARM processors to control the camera system with the Raspberry Pi. Almost all of the Broadcom GPU's proprietary code is bypassed, which customers have no access to.

It provides a C++ API to apps and operates at the base of configuring a camera and enabling the program to obtain image frames. Image buffers are stored in memory space and can be supplied to either video encoders (like H.264) or still image encoding algorithms like JPEG or PNG. raspistill, on the other hand, does not perform any image encoding or display operations directly.

How can we use this tool?

An illustration of how to take time-lapse photography is shown in the following image.

In this case, the time-lapse capture was 10 seconds long. The Raspberry will wait for a total of 2000 milliseconds between each image. For 10 seconds, the Raspberry Pi will take a picture every two seconds.

The photos will be stored as .jpg files. This example uses the name "Pic" and a number that increases with each frame to identify each image. The final digit of percent 04d is a zero. Pic0000.jpg and Pic0001.jpg would be the names of the first two photographs, and so on. Change this value according to the requirements of your project.

How can we compile the to a video?

Your time-lapse video needs to be put together once all of your photographs have been taken. FFmpeg is the tool we'll be utilizing to generate our timelapse video. The command to download the package is as follows:

Allow the installation to be complete before moving on. Using this command, you can create a finished video:

Pic%04d.jpg corresponds to the image filename you specified in the preceding section. If you have previously changed this name, please do so here. With the -r option, you can specify how many frames per second you want to record. When creating a time-lapse video, replace the phrase video-file with your name. Make sure to keep the .mp4 file extension.

What is FFmpeg?

A high-speed audio and video conversion tool that can also capture from a webcast source is included. On the fly, video resizing and sampling can also be done with high-grade polyphase filters.

A plain output URL specifies an indefinite number of outputs that FFmpeg can read from (standard files, piped streams, network streams, capturing devices, etc.), whereas the -i option specifies the number of input files. An output URL is encountered on the command-line interface that cannot be treated as an option.

Video/audio/subtitle/attachment/data streams can all be included in a single input or output URL. The container format may limit the quantity or type of stream used. The -map option can map input streams to output streams, either automatically or manually.

For options, input files must be referred to by their indices (0-based). It's not uncommon to have an infinite number of input files. Indexes are used to identify streams inside a file. As an illustration, the encoding 2:3 designates the third input file's fourth and final stream. In addition, check out the chapter on Stream specifiers.

  1. Using Photo timer

A Python library named phototimer will be used to control the raspistill command-line that comes pre-installed on the Raspbian OS.

  • With the use of this tool, we're able to add valuable features like:
  • Set a time frame for your day.
  • After capturing a photo, create a date-based folder such as:

Let us install docker to use this tool

Using docker, you can develop, analyze, and publish apps in a short time. To run phototimer with Python installed, you'll need to use Docker with Raspbian Lite.

  • Automatic restarts of the time-lapse

A new location does not necessitate an SSH login. The lapse of time will be restarted.

  • Easy setup

Download the Docker image, activate the camera interface, and start the container instead of executing a git clone on each device.

  • Easy access to logs

If you disconnect from the container, docker will keep track of the log information and will enable you to reconnect at any time.

Install Docker in Raspberry pi

We can easily set up docker with the following set of commands.

Clone the phototimer GitHub repository

Download the docker file as a zip as shown below

Or use the terminal by copying the phototimer code as shown here:

If git isn't already installed, use the following command to add it:

Edit the config file

By modifying the config.py file, you can change the time-appearance lapses and duration.

  • Set the hours

You will likely want to alter the default time-lapse settings so that they better fit your requirements, which start at 4 am and end at 8 pm.

  • Set the quality level

For some reason, overall quality of 35/100 produces a substantially smaller image than one with a quality of 60-80/100. You can modify the file to determine how much space you'll need.

  • Flip the image

Depending on how your camera is positioned, the image may need to be flipped horizontally or vertically. True or False in each situation will have the same result.

  • Height and Width

To achieve a specific aspect ratio, you can change the height or width of the image in this way. The default setting is what I use.

The Docker container must be re-built and restarted every time you change your setup.

Now let`s build a Docker container

When docker does a build, it will construct an image from the current directory's code and a base image, like Debian.

The most crucial part is that the image we create right now contains everything our application might want.

For those just getting started, these are some helpful keyboard shortcuts and CLI commands:

Start the timelapse

Let us configure the time zone for docker

The default time zone for the Docker container is UTC. If you're in a different time zone, you'll want to adjust your daylight savings time accordingly.

Docker can be configured to run in your current local time by adding the following additional option to the command:

As a result, the following is what a time-lapse in Texas, United States, might look like:

Below are some time-lapse images taken from the raspberry pi camera.

How can we save the file to our laptop?

To save your photos to your laptop, follow these steps once you've captured a few pictures:

The ssh and SCP functions are included in Git for Windows, which may be installed on Windows.

Connectivity options

You'll need a way to connect to your new rig when you're not near your wi-fi router if you plan on doing the same thing I did. There are a few ideas to get you started:

Use a USB OTG cable

All Pi models allow networking via USB, and it is very straightforward to establish and will not interfere with the wi-fi network. You will have to bring a USB cord to each new site to directly change the Wireless SSID/password on the pi.

Drop a wpa_supplicant.conf file into /boot

Plugging an SD card into your computer while on the road allows you to update your wi-fi configuration file easily, provided there is an SD card adapter nearby. The existing configuration will be replaced with this new one on the next reboot.

Setup the RPi as a wi-fi hotspot

If you're comfortable with Linux, you can use hostapd to create your hotspot on the RPi. To connect to your Raspberry Pi, you'll need a computer with an Ethernet cable and a web browser.

Install your wi-fi Username and password and use that to start/stop timelapse capture and download files if you won't be using the rig outside your location.

How to edit the video

The imported files should be in the correct order if you drag them onto the timeline after they've been imported, so be sure to do that. The crop factor should be set to "fill." Instead of 4.0 seconds, use 0.1 seconds for the showtime every frame.

  1. Transfer files to the Raspberry Pi using SCP

It is often necessary to transfer documents between the Linux laptop to an industrial Raspberry Pi for testing purposes.

Occasionally, you'll need to transfer files or folders between your commercial Raspberry to your computer.

There is no longer a need for you to worry about transmitting files via email, pen drive, or any other method that takes up time. Automation and industry control can help you automate the process in this post.

As the name suggests, SCP refers to secure copy. This command-line application lets you securely transfer files and folders between two remote places, such as between your local computer and another computer or between your computer and another computer.

You may see SCP info by using the command below:

Using SCP, you can transfer files to the RPi in the quickest possible manner. There is a learning curve associated with this strategy for novice users, but you'll be glad you did once you get the hang of it.

  1. Enable SSH

You must activate ssh on your Raspberry Pi to use SCP.

Converting to GIF

A free program like Giphy can help you convert the videos to a GIF; however, this will lower the number of frames.

Conclusion

We learned how to use the Raspberry Pi to create a time-lapse animation in this lesson. In addition, we looked into the pi camera raspistill interface and used FFmpeg and phototimer to create a time-lapse. We also learnt how to interface our raspberry pi with our pc using ssh and transfer files between the two computers. The following tutorial will teach how to design and code a GPIO soundboard using raspberry pi 4.

How to Control Raspberry Pi 4 from Laptop using VNC

This is the third tutorial in our Raspberry Pi programming course. In the previous chapter, we learned how to install Raspbian on our Raspberry Pi mini-computer. In this chapter, we'll learn how to use a VNC server to remotely control and see its desktop from our computer.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Raspberry Pi 4AmazonBuy Now

What is VNC?

Computing over a network is known as "virtual network computing," or "VNC." To remotely control another computer, you can use this screen-sharing technology, which works on all major operating systems. As a result, a remote user can interact with a computer's display (screen, keyboard, and mouse) as if they were sitting right in front of it.

VNC takes advantage of the client/server concept. Rather than installing a VNC server on the distant device, users will instead use a VNC viewer or client on the device they wish to control. Use a tablet or a smartphone in place of one of the previously mentioned computers. As soon as a viewer and a server are connected, the server gives the viewer a screen copy of the computer on the other side of the world.

Thanks to the application, both the remote user and the connected user can see and control everything on the distant computer's screen using keyboard and mouse instructions from afar.

What’s a VNC Server?

Other programs (referred to as "clients") can access the resources on a computer server. The server can provide services to one or more clients, such as data or resource sharing, in what is known as the "client-server model." The advantage of this strategy is that a single server can service many clients, while a single client can make use of several servers. A server will respond to a request from a client by sending back a response.

When a computer has VNC Server software installed, it can be accessed and controlled remotely from another device. The software makes it possible to stream the device's desktop to another computer running VNC Viewer. Once a connection is established, users using VNC Viewer can view exactly what a person seated in front of the remote computer sees (with permission).

What’s a VNC Viewer?

A viewer is a piece of software that allows you to see the contents of a digital file in its entirety.

Remote control of local PCs and mobile devices is made possible through the usage of VNC Viewer. Using VNC Viewer software, a user can access and operate a machine from another place using a device such as a computer, tablet, or smartphone.

As a desktop sharing system, it delivers keystrokes, mouse clicks, and other input events to a remote computer running VNC Server so that you may control it from your mobile device once connected. It's as if you're sitting directly in front of the computer that you've accessed remotely.

What protocol is used by VNC?

VNC uses a protocol called remote framebuffer to share data between the client and server, which determines the type of data exchanged. Using this, clients can access and control another machine from afar. Because it's compatible with all windowing apps and systems, it may be used on any mainstream operating system, including Windows, macOS, Linux, and others.

User access to a computer's monitor, mouse and keyboard is provided via the RFB client or viewer (also known as a client). Framebuffer updates originate on the RFB server (as in the windowing system). A key goal of Remote Framebuffer is to run on a wide range of hardware and to simplify the process of building a client by requiring as little input from the client as possible.

File transmission, more advanced compression, and stricter security procedures have all been added to RFB since its inception as a basic protocol. When using VNC, clients and servers can agree on the appropriate RFB version to use, as well as the security and compression options that are supported by both parties. Cross-platform interoperability is made possible as a result of this.

Why use VNC?

There are times when you won't be able to use your Raspberry Pi. For instance, you might have forgotten about your Raspberry Pi while away, or it may be buried beneath your TV or other devices. Using Raspbian and the free VNC software, you can connect to your Raspberry Pi wirelessly from any other device running Raspbian. You have the option of connecting to the internet or to your home network.

Prerequisites

  • Raspberry Pi running Raspbian
  • A network connection
  • A VNC server and viewer

Configuring VNC on a local network

Enable VNC

Begin by ensuring that both computers involved are on the same local network.

Select Preferences > Raspberry Pi Configuration from the apps menu icon (raspberry) at the top-left of the screen.

The default password for Raspbian is 'raspberry,' which you should change right away. By clicking the Change Password option, you can set a new password. Select the Enabled radio button next to VNC on the Interfaces tab. OK when you're finished. Menu bar in upper right corner of screen has VNC button at end of menu bar VNC Server will be launched as soon as you click on it.

Note your Ip address for the next steps.

Open VNC Viewer

You can now link your Raspberry Pi to another computer. Instead of a Windows computer, you might use a Mac or Linux computer on the same network or even another Raspberry Pi.

With a web-based interface, VNC Viewer may be used on a variety of platforms including macOS, Linux, Android, and iOS. On the official website of realvnc, download VNC Viewer. To use the software, it must first be downloaded and then installed.

Connect to Raspberry Pi

In the "Enter a VNC Server address or search" box of the VNC Viewer, enter the Raspberry Pi's IP address (the four numbers displayed in VNC Server). RETURN is all that is needed to disconnect when a connection is established. If an error message appears, press the Enter key to proceed.

For security reasons, you'll need to log in with your Raspberry Pi's username and password. To remember your password and access Raspbian, select ‘Forgot Password’ and then OK.

Remote control

The Raspberry Pi window is shown on your windows computer. By dragging the mouse cursor around the screen, you can see the Raspberry Pi's mouse. Remote control of your Raspberry Pi is now possible thanks to this window.

When you hover your mouse over the top of the VNC Viewer window, a menu will appear. Enter The Full Screen option is located to the left of the Options and allows you to have the preview window take over your screen. Because your Raspberry Pi display may not be compatible with your PC display, choose Scale from the menu (such that it is set to Scale Automatically).

Your Raspberry Pi will provide you a desktop PC-like experience.

Looking at properties

Close the VNC preview window and use the VNC Connect menu bar to get to the properties. You can end a session from the drop-down menu.

To access your Raspberry Pi's desktop, simply open VNC Viewer from the Address Book. To reopen the connection, simply double-click on the icon and select Properties from the context menu that appears.

Enter 'Raspberry Pi' in the Name field. This will give your screen a more personal touch. After that, select Options. Automatic is the default setting for Picture Quality on your camera. The lower the setting, the better; if you have a fast connection, the higher it should be.

Make sure to check out the "Experts" section at the bottom. In this section, you'll find configuration options for pretty about everything on your computer. You can change the False to True option in the Fullscreen drop down box. In VNC Viewer, you can preview your Raspberry Pi in full-screen mode. After you've made your options, click OK to keep them.

Remote access in wide area network

You may access your Raspberry Pi from anywhere in the world with a RealVNC account.

Verify your identity in the upper left corner of VNC Viewer when it has been opened. Sign up if you don’t have an account. Set up a password for your account. Keep your password at least eight characters long and difficult to decipher. There is a RealVNC home page that you will be taken to. Verify your email address and you're done setting up.

Sign in

A single account must now be used to sign in to both of these applications.

You should be able to see the VNC Viewer Sign In window from the computer. Your Raspberry Pi must be running VNC Server before you can connect to the cloud.

Go back to the VNC Viewer application on your PC. In the Address Book area, you will find a Raspberry Pi Window, but you'll also notice a Team option immediately below it.

What exactly is the distinction between the two?

This account can be used from different networks and operates remotely.

Send files

Sending and receiving files is possible between the Pi and computer. We've created a new text file called test.txt in our Documents folder.

Connect to the Pi using VNC Viewer to send a file. An option to transfer files can be found in the VNC Viewer preview window's menu.

Sending files is as simple as clicking the Send Files button in the VNC Viewer's File Transfer window and the transfer will begin. Click Open after you've selected a file from your computer's file picker. On your Raspberry Pi's desktop, the file will be saved. The message "Download complete" will appear in the File Transfer window; close it.

Retrieve files

With VNC Viewer, it is possible to download files from your Raspberry Pi's SD card. VNC Server icon can be found in the Raspbian menu bar by right-clicking it. Select File Transfer from the VNC Server drop-down option to open the File Transfer window.

Your Raspberry Pi can now be accessed remotely. The screen and keyboard can now be removed from your Raspberry Pi and left connected to the network. The PC connection will be waiting for you when you're ready.

Connect with Android and iOS

Using your smartphone, you can also remotely connect to the Raspberry Pi. Download the VNC Viewer software from the app store, then, open your VNC Connect account and log in using your email address and password.

Your Raspberry Pi will be listed in the Team drop-down menu. Click it and input your Raspberry Pi's username and password.

On start up, you will have to go through the 'Control the computer' step. The 'How to control' window will open once you click Next. This screen shows you how to use movements like mouse clicks on the touchscreen. Start using Raspberry Pi from your phone by closing this window.

To move the cursor, make use of your smartphone's touchscreen. An on-screen keyboard can be accessed with a simple swipe of your finger on a key at the top of the app.

Even on your phone, you can now access your Raspberry Pi. Remote monitoring has never been easier.

Misconceptions about VNC and VNC Connect

When it comes to deploying new software and systems, there will always be some trepidation, and there is a lot of misinformation floating about that influences how people feel about doing so. However, this has the drawback of preventing individuals and organizations from reaping the full benefits of new technologies.

In this article, we'll debunk some of the most popular myths regarding VNC Connect, many of which can be traced back to VNC's open-source roots.

  1. VNC is open source. Open-source software is common among recent adaptations of the VNC protocol; however, this does not apply to all VNC-based software. As of 2016, VNC Connect, which uses RFB protocol version 6, is not open source.
  2. It is not safe to use VNC-based software. Out of the box, open source VNC-based remote access is vulnerable to attack. Secure connections are built into VNC Connect right out of the box, and remote PCs are secured by default with a password or system login credentials.
  3. VNC doesn't work with the cloud. The majority of open-source VNC-based applications is only available for use offline. Offline (commonly known as "direct") and cloud connections are also available through VNC connect, so you can select the one that best suits your company needs.
  4. The VNC protocol is out of date. VNC technology has been around for more than 20 years, but it has undergone a major transformation. VNC Connect is continually checked and updated to correct any faults that may arise and to meet the ever-changing needs of its users. The software roadmap is based on user feedback to ensure that it incorporates the designs and features that are most frequently requested.

Conclusion

Because buying two keyboards, monitors, and mice for your computer and Raspberry Pi would be prohibitively expensive, VNC is a great option to gain access to your raspberry pi remotely. The two computers can be used at the same time, and you don't have to switch between them. So far, we've learned how to set up our mini-computer for VNC and how to establish a remote connection to the VNC viewer. Our first project will be to use Python to control the GPIO pins of a Raspberry Pi 4, which we will cover in the next topic.

Installation of Raspbian in Raspberry Pi 4

Welcome to the second chapter of our beginner's course on the Raspberry Pi. In the previous tutorial, we learned about the components of this little computer. We also considered its uses, as well as the most important advantages and disadvantages. Let's get started with setting up our little computer to run the Raspbian operating system in this lesson.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Raspberry Pi 4AmazonBuy Now

How to Install Raspbian using an imager

The next step is to make sure you have your board and SD card. The Raspberry Pi has an operating system because it is a full computer. For those who prefer a GUI desktop experience, a headless mode is still an option. Most people use Raspbian, a Debian-based operating system tailored specifically for the Raspberry Pi. However, there are other options. An excellent starting point is this operating system, which is likely to support other Linux packages that you are already familiar with.

Other means to install and run an operating system on the Raspberry Pi are also available. The imager installer is the most convenient method. As long as you're familiar with the operating system ISO, you may download it to your SD card, format your SD card and mount the ISO, and then boot the Pi. Follow the imager installation option if that's all gibberish to you.

Download imager

For this process, we will open our browser and navigate to the raspberry pi website and down to the software option, you will see a download for windows. This button allows you to download the imager for windows which in my case I am using. If you are using another operating system like mac and ubuntu there are also imagers for those particular operating systems.

The executable imager file will be downloaded to your computer as seen below.

This software allows us to flash our operating system into the micro-SD card which will be used in the mini-computer.

Flashing the operating system into the storage card

Connect the card reader with an sd card in it to your computer through USB or a regular card slot.

Launch the imager

On your computer, navigate to the location you downloaded the imager software and run it. In windows just double-click on it and it should startup.

Once the installation is done, go ahead and run the application:

Selecting the SD card

On the pi imager window, there are two options and when we click the choose storage, our SD card is detected since we plugged it into our pc.

If you have any other drive plugged into your pc, they will also appear on the window therefore be careful to select the right one otherwise you will override the wrong drive and lose your saved files.

Select the operating system

We will click on the other button "choose os" that is on the pi imager window to select the operating system we want to flash into our SD card. You will see different types of operating systems available for installation and we will go ahead and select the 32-bit raspberry pi os.

Write to SD card

Once all the required parameters are set, i.e., the os and storage, go ahead and click the write button. The flashing process begins and it takes a minimum of 5 minutes to complete.

How to Install Raspbian with etcher

NOOBS (New Out of the Box Software) is an automated installer provided by the Pi Foundation, but for this article, we're going to forego it for now.

To complete numerous projects, it is a good idea for you to learn about "flashing" the SD card yourself. Despite NOOBS's reputation as a beginner's tool, I found this one to be easier to use.

You'll need an image file and an application to put it to your SD card to install an operating system. However, you can use any operating system of your choice for this guide. For example LibreELEC for a media box; RetroPie for retro gaming; and so on.

Because it's accessible for Windows, macOS, and Linux, Etcher is my go-to tool for writing to the SD card. There may be partitions that aren't visible in Windows, but these may be cleaned out with diskpart if you've previously used the SD card in a Pi.)

The full Raspbian image with suggested software is what I'm running, so go ahead and download it if that's what your Pi model calls for. It will either be an IMG file or an IMG compressed into a ZIP file (which you don't have to do if you're using Etcher).

It's as simple as opening Etcher and clicking the Select Image button to select your downloaded file. Flash your SD card by selecting it as the target. Selecting a destination drive should only be done with extreme caution, as the operation will wipe whatever disk you select.

Once the SD card has been ejected, you can insert it into your Pi, connect the HDMI wire to a display or TV, and turn on the Pi by plugging it into the wall. Once you've landed on the Raspbian desktop, you can begin fiddling with your Wi-Fi and software installations with apt.

Booting the raspberry pi

Now that flashing is complete, with the pi powered off, we will go ahead and eject the storage SD from the pc and put it back to the raspberry pi SD slot. Then we will go ahead and plug the power cord back in and our mini computer should start. If you mouse, keyboard and screen go ahead in the previous tutorial and see how they are connected since they are necessary for this step.

The mini-computer boots up into the os and you will find a window with instructions on what to do. Follow through the graphical user interface, provide a password, location, screen, and Wi-Fi connection.

Then go ahead and install updates and the raspberry pi will reboot. A couple of issues will be solved when it boots up such as window dimensions and resolution.

We will do some more configurations in the terminal, therefore go ahead and start the terminal.

Configuration

Preferences on the menu can be found in the Configuration tool, which enables you to change most of your Pi's settings, including the password.

Several options are available, as illustrated in the screenshots below. We'll enable vnc and ssh for the time being. The Raspberry Pi's fundamental system settings can be modified in this area.

It's a good idea to change the factory default "raspberry" password for the pi user. When your Raspberry Pi boots up, choose between using Desktop or CLI (command line interface), and enable Auto Login.

You can set your Raspberry Pi to wait until a network connection is available before starting up, by selecting network at boot.

You can choose whether or not your Raspberry Pi boots up with a splash screen.

Interfaces

There are numerous ways to connect your Raspberry Pi to other devices and components. For your Raspberry Pi to recognize that a specific type of connection has been made to it, you must use the Interfaces tab to enable or disable the various connections.

To use the camera on the Raspberry Pi, you must first enable it.

A Raspberry Pi can be accessed remotely through SSH or VNC.

To enable the SPI, I2C, and Serial (Rx, Tx) GPIO pins, go to the SPI menu. To enable the 1-Wire GPIO pins, go to the 1-Wire menu. To enable the 1-Wire GPIO pin, go to the 1-Wire menu. To enable Remote GPIO, go to the Remote GPIO menu.

Performance

We can alter the performance settings of our Raspberry Pi on this tab if we need to do so for any specific project.

Caution: Changing the performance parameters on your Raspberry Pi could cause it to behave strangely or stop working altogether.

If you want to boost your computer's performance, you can overclock the CPU and adjust its voltage.

Localization

This enables you to customize your Raspberry Pi's settings based on where you live.

To configure your Raspberry Pi's locale, select the language, nation, and character set you want to use.

For example, you may want to change your time zone, or you may want to switch to a different type of keyboard layout.

Go ahead and finalize the configuration and reboot now that you've completed the setup.

Setting up remote connections

  1. On Windows, connecting to the Raspberry Pi via RDP is a straightforward process.

You don't need much more than a remote desktop program and the IP address of your Raspberry Pi to get started.

Open Remote Desktop Connection on your Windows computer to get started. The app will appear as seen in the image below.

In the "Computer:" field, type in the local IP address of your Raspberry Pi (1.), and then click the "Connect" button (2.).

  1. After connecting to your Raspberry Pi, the xrdp software will present you with this screen.

Enter the account's "username" and "password" from your Raspberry Pi.

If you're logging in as the default pi user, your username and password should be "pi" and "raspberry," respectively.

  1. You should now be able to connect to your Raspberry Pi using the Windows remote desktop program.

Have trouble connecting to the Raspberry Pi? Double-check that your IP address is accurate. TeamViewer or TightVNC are two other options.

I hope you can now access the Raspberry Pi's remote desktop using the tool of your choice.

Installing Python on the Raspberry Pi

Python will be installed on your Raspberry Pi, and you'll see how simple it is to do so. This can be accomplished in a few simple steps thanks to Python's default package repository.

  • We should check our package list and existing packages for updates before we install Python. The following instructions can be used to update both of these on your device. Let's go on to the next phase now that we've completed this one.
  • Next, we'll set up our Raspberry Pi with the Python package we downloaded earlier. Python 3 will be the focus of this guide because it is the most recent version that is still widely supported. Installing Python is as simple as running the following command.
  • Once this process completes, you will now have Python installed on your Raspberry Pi. This will provide you with the minimal essentials of Python, but that is all you will need for now. Later on, you will end up using package management such as pip to extend the capabilities of Python.

Using the Thorny Desktop IDE

Thonny, a Python IDE, is pre-installed on desktop versions of Raspberry Pi OS. It is much easier, faster, and more pleasant to write code when using an IDE. Open Thonny on your Raspberry Pi, and then learn a little bit of Python in the process.

  • The Thonny IDE must first be opened before we can proceed. On your computer's desktop, go to Start, and then click "Raspberry". Next, you'll need to click on the "Programming" option on the left-hand side of the page. Lastly, select the "Thonny Python IDE" option to launch the Python editor on your Raspberry Pi".
  • Since you're probably using Thonny for the first time, let's go through the basics of how it works.

The toolbar is located at the very top of the screen. All the buttons you'll ever need to work with the editor are right here. The "Save" and "Run" buttons are the only ones you'll need (1.)

It's time for the center box. All of your Python code can be written here. (2.)

Finally, the Python shell is at the bottom. You can use this to directly communicate with Python. The output of your code can also be found here (3.).

Conclusion

You should now have a better understanding of how to get started with Python on your Raspberry Pi. This instruction explains how to install the Raspbian operating system, configure its interface, and install the Python interpreter with a few basic command lines. On the Raspberry Pi, we also demonstrated how to start a Python code editor to develop code.

Getting Started with Raspberry Pi Programming Series

to our new beginner’s course on Raspberry Pi. This course is appropriate for anyone using either a traditional Raspberry Pi board or the new Raspberry Pi 400 board that includes an integrated keyboard and display. Learning how to code, building robots, and doing plenty of other strange and exciting things are all possible with this low-cost computer setup. The Raspberry Pi can do everything a computer can do, from surfing the web to viewing movies and music, and playing video games.

Raspberry Pi is much more than a modern computer. It`s created to educate young people on how to program in languages such as Scratch and Python, and it comes with all of the major programming languages pre-installed. The world is in desperate need of programmers now more than ever, and Raspberry Pi has sparked a new generation's interest in computer science and technology. Raspberry Pi is used by people of all ages to build intriguing projects ranging from old-school gaming systems to internet-connected weather equipment.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Raspberry Pi 4AmazonBuy Now

What are the aims of this course?

In this course, we'll learn how to make games, build robots, or hack all kinds of fantastic projects. The Raspberry Pi 4 Model B will be covered in this course. In the event that you're working with a different model of Raspberry Pi, don't be worried. whatever is taught here can be applied to any other model in the family.

What is this mini-computer?

It is a small computer about the size of a credit card that can run the Linux operating system. It uses a "system on a chip," which combines the CPU, GPU, RAM, USB ports, and other components into a single chip.

To distinguish it from traditional computers that conceal their internal components behind a casing, the Raspberry Pi's ports and functions are fully exposed, a protective case is available to buy. If you want to know how different computer components work and where to put the various peripherals, this is a great resource.

Features

All Raspberry Pi models share one feature in common:

  • Software written for one model can be used on another, as they are interchangeable.
  • Raspberry Pi operating system can even run on a pre-release Model B prototype. Although it will take longer, still run.

With this, what are you able to accomplish?

Now you've got a little machine that runs a lot of free software, so that's good. Exactly what can you do with it? Fortunately, I've got a simple and fun Python project that I used to teach middle school children in a coding lesson.

  • It's possible to create a weather station, a calculator, a gaming gadget, and a lot more out of the same thing. If you have a Raspberry Pi, you can even make a customized espresso machine that is secure like a Raspberry Pi locked door lock, as this one.
  • Can be used as a game server
  • Controller for robots
  • Webserver
  • Cryptocurrency Mining

Advantages of using this mini-computer

  • Low price
  • High computing power in a small board
  • Numerous interfaces
  • Linux and Python are supported

Disadvantages

  • Windows cannot be installed on the computer.
  • Inconvenient to use as a Desktop PC.
  • There is no graphics processor.
  • Internal eMMC storage is not present.
  • We can't attach external RAM as in a normal computer.

Components in a Raspberry pi

The Raspberry Pi features a number of parts that can be used to control the Raspberry Pi as well as other devices. The following ports will be available on your Raspberry Pi:

  1. System-on-chip

The majority of the Raspberry Pi's system resides on an integrated circuit, which is what the term "system-on-chip" refers to. Included in this is the CPU, which is referred to as a computer's 'brain,' as well as the graphics processing unit (GPU).

  1. Random-access memory (RAM)

A brain is useless without memory, therefore you'll notice another chip to the side of the SoC, tiny and black plastic, like a cube where RAM is located. When you're working on a Raspberry Pi, the RAM stores your work; it's only when you save it to the microSD card that it's written to the microSD card. The volatile and non-volatile memories of the Raspberry Pi are made up of these components. When the Raspberry Pi is turned off, the volatile RAM loses its contents, however, the non-volatile microSD card retains them.

  1. Raspberry pi`s radio module

A metallic lid covers the Raspberry Pi's radio component, which allows it to communicate wirelessly with other devices. In actuality, the radio has two main functions. Wi-Fi and Bluetooth are built-in, so you can use them to communicate with your computer and other nearby smart devices, sensors or cellphones.

  1. power management integrated circuit (PMIC)

Just behind the middle row of USB ports, an additional black, plastic-covered chip is seen towards the board's bottom border. The USB controller manages the four USB ports. The network controller is positioned next to this chip. An integrated circuit (PMIC) is also located on the upper left side of this board. It is in charge of converting power from a USB port to the precise voltage that the Raspberry Pi needs.

  1. Ports for connecting USB devices

The circuit board contains a variety of ports, beginning with four ports in the right side of the bottom edge. You can connect any USB-compatible device to your Raspberry Pi using these ports, including keyboards, mice, digital cameras, and flash drives. One of the two types of USB ports is a USB 2.0 port, which uses version two of the USB standard; the other is a USB 3.0 port, which uses version three.

  1. Ethernet port

There is an Ethernet port. Using an RJ45 cable, a Raspberry Pi can be linked with a wired computer network via this port. You'll notice two LEDs at the bottom, which indicate the connection is operational.

  1. Raspberry Pi AV jack

There is a 3.5 mm audio-visual jack. Connecting to amplified speakers rather than headphone jacks improves sound quality, but the headphone jack can still be used. Audio and video signals can be transmitted using the TRRS (tip-ring-ring-sleeve) adapter, which connects the 3.5 mm AV jack with projectors, tv, and other displays that can receive composite video signals.

  1. Camera connector

The camera serial interface (CSI), or camera connector, as it is most commonly called, is located above the AV jack and has a strange-looking plastic flap that may be pulled up (CSI). This allows you to connect a camera, which you'll learn later in this course.

  1. micro-HDMI ports

There are two micro HDMI connections available, which are a scaled-down version of the connectors seen on gaming consoles, set-top boxes, and televisions. Multimedia denotes that it can transport both audio and video information, and high-definition indicates that the quality will be excellent. A computer monitor, television, or projector will be needed to connect the Raspberry Pi to these adapters.

  1. Type-C port

The port above the HDMI ports is where you'll plug in the Raspberry Pi's power supply. USB Type-C ports can be found on smartphones, tablets, and other mobile devices. Instead of a standard mobile charger, employ the certified Raspberry Pi USB Type-C Power Supply for the best results.

  1. Display connector (DSI)

There is a strange-looking connector at the top of the board, which appears to be the camera connector at first sight, but it's not. It is for usage with a Raspberry Pi Touch Display.

  1. Raspberry Pi’s GPIO header

In two rows of 20 pins each, you'll find 40 metal pins along the right edge of the board. To communicate with peripherals such as LEDs and buttons to temperature sensors, joysticks, and pulse rate monitors, the Raspberry Pi includes a function known as GPIO (general-purpose input/output).

  1. Raspberry Pi’s microSD card connector

The Raspberry Pi has one more port, the micro-SD connector, which is on the other side of the circuit board. The MicroSD card is inserted here and you'll find all the files you've saved and installed as well as the operating system that makes your Raspberry Pi work.

What can you expect from the Raspberry Pi?

  • 1GB of RAM, and dual-band 802.11ac wireless LAN
  • This device has a Bluetooth 4.2 connection; it also has four USB 2.0 connections, an HDMI port, a composite video port, and 40 GPIO pins.
  • 3D graphics, Camera interface (CSI), Display interface, and Micro SD card slot (DSI)

What operating system is it using?

Unfortunately, the Raspberry Pi lacks the ability to run either Macintosh or Windows. Instead, it uses Raspbian, a Linux distribution. Installing Raspbian on your own micro-SD card is also possible using the NOOBS installation. You'll see this loading screen when you insert in the microSD card with Raspbian installed and turn on the Raspberry Pi.

As you've seen, the desktop on your huge PC looks exactly like the one you are used to. A web browser, terminal, picture viewer, calculator, and a slew of other tools are all included by default.

Requirements before you begin

The Raspberry Pi is the heart of your project, but without a power supply or storage, it won't be able to go very far. To get started, you'll need the following:

  1. The Raspberry Pi

      1. A Power Supply

The power supply standard for the Raspberry Pi 4 has been upgraded from microUSB to USB-C, which is an improvement. Powering your Raspberry Pi is best done with a dedicated power adapter from the Raspberry Pi Foundation.

      1. MicroSD Card

The later Pi models use microSD cards instead of the normal SD cards that were used in the original Pi models A and B. However, not all SD cards function correctly, therefore it's preferable to acquire a pre-loaded operating system with the original Raspberry Pi microSD card or a tested suitable card, such as the SanDisk Ultra 32GB.

      1. Case

This is technically optional, but we strongly advise it. It is a good idea to use a case to protect your bare board rather than leaving it exposed. The FLIRC case has a built-in heatsink, making it an excellent choice for older models of the Raspberry Pi.

      1. Mouse, Keyboard, and HDMI Cable

You can control your Raspberry Pi using a keyboard and a mouse. Raspberry Pi can utilize almost any USB-connected keyboard and mouse, wired or wireless. However, don`t use 'gaming' keyboards with flashing lights since they consume too much power to be used successfully.

USB gamepads are also necessary when you are building consoles like a gaming rig, therefore, don't forget about them.

First time set up

We are now going to set up our minicomputer therefore follow these simple steps to get yours up and running:

  • An SD card should be inserted into the SD card slot on the pi board. For the time being, we strongly advise you to stick with Raspbian until you are more comfortable with its features.
  • Use one of the USB ports to connect a mouse and a keyboard to the system. When using 'gaming' mice or other high-end equipment that requires software and drivers, it might waste power and place additional strain on the system. Just use 'plug-and-play' equipment to keep things easy and hassle-free.
  • Using the HDMI port, connect a monitor. Connect the monitor to a wall outlet, and then turn the power on and off as necessary. If you turn on the Raspberry Pi right now, nothing will happen. Adapters for non-HDMI monitors that don't impede access to the USB ports should be used.
  • In order to use Ethernet instead of Wi-Fi, you will need to connect an Ethernet cable as well. The speaker or headphones should be plugged in as well if you wish to hear sound from the speakers. However, to get the Raspberry Pi up and running, you don't need either of these items.
  • Finally, insert the micro-USB cable into the power source and into the wall socket. The Raspberry Pi's red LED will light up, and you'll be able to see it booting up on the monitor. Once you get back to your computer, you'll see a desktop screen.

Congratulations! You've successfully assembled your Raspberry Pi! I hope you have something like this:

Conclusion

At this point in the course, we've learned about the Raspberry Pi computer and what each component does. Our minicomputer has now been set up, and in the next tutorial, we'll learn how to use the python programming language with the Raspbian operating system.

Arduino Vs Raspberry Pi

Hello friends, I hope you all are fine and enjoying your lives. Today, I am going to share a comparison titled Arduino Vs Raspberry Pi. Actually, I have been receiving a lot of emails and comments from new engineering students that "we are new in embedded and we want to start our project so please tell us which one is better Arduino or Raspberry Pi?" So, I thought to write a post on Arduino Vs Raspberry Pi and in this post, I am going to make a detailed comparison between the two and will let you know, which one you should use in your project and why?

So, I hope that you are all aware of or at least have heard about these two boards, which are Arduino and Raspberry Pi. If you haven't heard yet then you must have a look at Arduino Official Site and Raspberry Pi Official Site. They will give you a basic overview of what these boards are. Anyhow, I am going to start it from the very basics so that you guys won't get into much trouble. So, let's get started with Arduino Vs Raspberry Pi:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino Mega 2560AmazonBuy Now
2Arduino NanoAmazonBuy Now
3Arduino Pro MiniAmazonBuy Now
4Arduino UnoAmazonBuy Now
5Raspberry Pi 3AmazonBuy Now
6Raspberry Pi 4AmazonBuy Now
7Raspberry Pi PicoAmazonBuy Now
8Raspberry Pi ZeroAmazonBuy Now

Arduino Vs Raspberry Pi

I have created few points below and in each of these points, I have made the difference between these two boards. I have also mentioned their strengths and weaknesses and which one to use. Obviously, they both have their own importance so we can't say that one is better than the other. Instead, we are making a comparison between the two and then you will get a clear idea of which one you should use for your project. The selection of your controller board actually depends entirely on the nature of your project. Am I getting far :O don't worry if it's more to digest about Arduino Uno R3 Vs Raspberry PI 3, I am explaining them below in detail. :D

1. History

Arduino:

  • The idea of Arduino was first presented by Massimo Banzi in Italy. That's why it's written Made in Italy on each of these boards. :)
  • Banzi was a teacher at Interaction Design Institute Ivrea and the reason for designing these boards was to help his students by giving them an easy-to-use platform.
  • So that, students don't waste much time over soldering etc and spend more time in designing the algorithms.
Raspberry Pi:
  • Raspberry Pi was first invented by Eben Upton in the United Kingdom.
  • He was also a teacher and he has the same reason for developing these boards.
  • He also wanted to help his students so that they learn more out of it.
  • Upton was a Professor at the University of Cambridge.
Obviously, they both have co-founders, who have helped them a lot in bringing these ideas to existence. So, let's move on to the next step of this Arduino Vs Raspberry Pi comparison.

2. Nature of Arduino & Raspberry Pi

Arduino:
  • The Arduino boards are actually Microcontrollers boards but in a very easy-to-use form.
  • Have you ever worked on PIC Microcontroller, Atmel or 8051 Microcontroller?
  • If you have worked on standalone microcontrollers, you must be aware of Microcontroller basic circuit, which includes crystal oscillator and pull-up resistors, capacitors etc.
  • Moreover, you also need the programmer/burner hardware using which you upload your code into these microcontrollers.
  • But in Arduino, you don't need to use any of these. Arduino comes with a built-in programmer and an onboard basic circuit for powering up the microcontroller.
  • So, what you need to do is simply plug Arduino board and start testing your code.
  • So, in simple words, Arduino is nothing but a simple microcontroller board.
Raspberry Pi:
  • Now if we talk about Raspberry Pi, it's a mini-computer and is actually termed a microprocessor.
  • Raspberry Pi has onboard RAM, ROM, i/O Ports, USB Ports, HDMI Port etc.
  • Seems quite powerful than Arduino but don't come to a conclusion right away :)
  • But yes Raspberry Pi is like a small computer, obviously, it's not comparable with your Laptop or PC but it's really powerful.
  • And the beauty of it lies in the small size and low price.
  • The latest Raspberry Pi even has a RAM of around 3GB, which is quite a lot. I am using Note 3 Mobile and it has 3GB RAM. So, now you can get an idea of what it is capable of.
  • As it's a small computer so you must be thinking what its operating system. When it comes out of the factory, it has no operating system on it but one can install any operating system like Linux, Windows etc.
  • Normally it is used with Linux and its current operating system is called Raspbian.
So, from the above discussion, we concluded that Arduino is a Microcontroller board while Raspberry Pi is a mini-computer. Next, we are going to have a look at the type of Arduino Vs Raspberry Pi.

3. Types of Arduino Vs Raspberry Pi

Arduino:
  • The first board developed by the Arduino company was Arduino UNO which uses Atmega328 Microcontroller but later on, they have developed many new boards.
  • For example, now we have Arduino Ethernet Shield, Arduino Wifi Shield using these we can provide Internet access to our system.
  • Recently they have also developed the Arduino YUN board, which also supports Linux just like Raspberry Pi.
  • Arduino Due is another board that works on a 32-bit instruction set.
  • So, in short, there are a lot of Arduino boards and by combining different boards you can accomplish anything.
  • Suppose, you want to control your Fan via Wifi then you can use Arduino UNO with Arduino Wifi shield and you can easily design this IoT project and can control the fan over WiFi.
Raspberry Pi:
  • Raspberry Pi doesn't have different boards for different tasks like Arduino.
  • Like once there was Raspberry Pi Model A but then they added some more functionality like increased the RAM end so we have Raspberry Pi 2, Raspberry Pi 3 Raspberry Pi 4 etc.
  • So, you can think of Raspberry Pi as a mobile, whose models come out with more enhancement.
  • As I told you earlier Raspberry Pi is a small computer board so it already has everything in it like Wifi, Ethernet, USB Host etc.
  • Raspberry Pi has recently launched a Microcontroller board called Raspberry Pi Pico, which is available for $4.

4. Programming Code

Arduino:
  • For programming Arduino boards, Arduino has launched official software called Arduino IDE.
  • Arduino uses C programming language with a slight difference in syntax from the original C.
  • It has an extensive list of libraries(mostly third-party) for interfacing sensors and modules.
Raspberry Pi:
  • Raspberry Pi can be programmed in any high-level programming language i.e. python, C# etc.
  • Normally, python is used for programming purposes.

Arduino Vs Raspberry Pi - Which one you should prefer?

For a new Engineering student, who has just started his project. He always wonders which one I should use among these two. Should I go with Arduino or should I start working on Raspberry Pi? It's really a big question if you are new in this field. So, let me tell you one thing first, no one is better than the other, Arduino and Raspberry Pi both have their own importance. Now which one you should use, entirely depends on the nature of your project. So, let's take a look at projects for both of these boards. I think this Arduino Vs Raspberry Pi comparison is now going to take an interesting turn. :)

Arduino:
  • Whenever you are working on some pure hardware-related project, in which you need to use different sensors, need to move your motors or actuators etc. then you should always go for Arduino because Arduino is a microcontroller and its best for hardware equipment controlling.
  • That's why in most of the Electrical, Electronics, Mechatronics and Mechanical Projects, Arduino is preferred.
  • It's not like you can't control sensors or motors on Raspberry Pi but it's too difficult in Raspberry Pi and quite easy in Arduino.
  • Moreover, with Arduino, you can attach as many sensors as you want. In simple words, Arduino has a lot of I/Os.
  • Once I have to work on a project, in which I have to control fifty relays so in that case I have used Arduino Mega 2560 which has around 60 input/Output Pins.
  • But you can't control fifty relays with Raspberry Pi.
  • So, in all the hardware projects where you don't need to do cloud computing, IoT etc. it's always preferred to use Arduino boards.
Raspberry Pi:
  • Raspberry Pi is mostly used in computer software projects i.e. IoT, cloud computing etc.
  • Like you have a project in which you need to send data over to some network, then in these types of projects, your first choice should be Raspberry Pi.
  • I once had a project in which I have to design an online Home Automation system.
  • So, in such projects, we just need to interface few sensors which we can do with the Raspberry Pi as it has few Input/Output Pins.
  • But the main part of such projects is to send sensors data over to some network so Raspberry Pi is the right choice here.
  • Although we can also use Arduino YUN in such projects as well but because Raspberry Pi is programmed in python so it's more flexible to use when it comes to cloud computing.
  • Similarly, if you want to design some Face recognition project then Raspberry Pi comes in handy because we can easily install openCV on it as it's an OS (LINUX), we can install anything we want.

So, that's a kind of an overview on Arduino Vs Raspberry Pi, which I think you guys must have enjoyed. It was quite boring so that's why I have tried my best to make it as interesting as I can, but still, if you find it boring then I can't do anything. :) So, that's all about Arduino Vs Raspberry Pi, I hope you guys have got something out of it. Will see you guys in the next tutorial. Till then take care and have fun. :)

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir