Raspberry Pi Zero W Wireless Projects
eBook - ePub

Raspberry Pi Zero W Wireless Projects

Vasilis Tzivaras

Share book
  1. 240 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Raspberry Pi Zero W Wireless Projects

Vasilis Tzivaras

Book details
Book preview
Table of contents
Citations

About This Book

Build DIY wireless projects using the Raspberry Pi Zero W boardAbout This Bookā€¢ Explore the functionalities of the Raspberry Pi Zero W with exciting projectsā€¢ Master the wireless features (and extend the use cases) of this $10 chipā€¢ A project-based guide that will teach you to build simple yet exciting projects using the Raspberry Pi Zero W boardWho This Book Is ForIf you are a hobbyist or an enthusiast and want to get your hands on the latest Raspberry Pi Zero W to build exciting wireless projects, then this book is for you. Some prior programming knowledge, with some experience in electronics, would be useful.What You Will Learnā€¢ Set up a router and connect Raspberry Pi Zero W to the internetā€¢ Create a two-wheel mobile robot and control it from your Android deviceā€¢ Build an automated home bot assistant deviceā€¢ Host your personal website with the help of Raspberry Pi Zero Wā€¢ Connect Raspberry Pi Zero to speakers to play your favorite musicā€¢ Set up a web camera connected to the Raspberry Pi Zero W and add another security layer to your home automationIn DetailThe Raspberry Pi has always been the goā€“to, lightweight ARM-based computer. The recent launch of the Pi Zero W has not disappointed its audience with its $10 release. "W" here stands for Wireless, denoting that the Raspberry Pi is solely focused on the recent trends for wireless tools and the relevant use cases. This is where our bookā€”Raspberry Pi Zero W Wireless Projectsā€”comes into its own.Each chapter will help you design and build a few DIY projects using the Raspberry Pi Zero W board. First, you will learn how to create a wireless decentralized chat service (client-client) using the Raspberry Pi's features?. Then you will make a simple two-wheel mobile robot and control it via your Android device over your local Wi-Fi network. Further, you will use the board to design a home bot that can be connected to plenty of devices in your home. The next two projects build a simple web streaming security layer using a web camera and portable speakers that will adjust the playlist according to your mood. You will also build a home server to host files and websites using the board. Towards the end, you will create free Alexa voice recognition software and an FPV Pi Camera, which can be used to monitor a system, watch a movie, spy on something, remotely control a drone, and more.By the end of this book, you will have developed the skills required to build exciting and complex projects with Raspberry Pi Zero W.Style and approachA step-by-step guide that will help you design and create simple yet exciting projects using the Raspberry Pi Zero W board.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Raspberry Pi Zero W Wireless Projects an online PDF/ePUB?
Yes, you can access Raspberry Pi Zero W Wireless Projects by Vasilis Tzivaras in PDF and/or ePUB format, as well as other popular books in Computer Science & Home Automation. We have over one million books available in our catalogue for you to explore.

Information

Year
2017
ISBN
9781788296908
Edition
1

WebPi Hosting

In the previous chapter, you learned how to create some portable speakers with your Raspberry Pi Zero W board. In this chapter, you will go through the most important topic when developing a website and hosting all the files in your Raspberry Pi Zero W. You will gain a general idea of client-server communication regarding web hosting services, some basic knowledge of web development and the way in which you should access and transfer your files from your local computer to the Raspberry Pi Zero W. Lastly, this chapter will conclude with some security tips and issues that you may face when hosting your files at home. To sum up, in this chapter, we will cover the following topics:
  • Client-server communication
  • Web hosting
  • Web design and development
  • Networking administration

Web hosting

In this section, we will define what web hosting is and what one must do to get his own personal web hosting service up. You should see this as an introduction to the rest of the chapter; so as always, the first step is to define exactly what we are doing here and what we should do in case we have no Raspberry Pi Zero W at our hands. There are several hosting services providing different solutions depending on needs of the customer. In the rest of the section, we will also describe the possible options that a customer has and the advantages or drawbacks of some of them.

Definition

Web hosting is a means by which you can host your files or website on a computer, where you or everyone has access to it from all over the world; for example, an e-shop has a website hosted on a server, and you are able to access and interact with the server through your browser or your mobile phone. Thus, the web hosting is more about the server side, how you can save your files and serve them to anyone that requests them. To make this easier to understand, let's look the following image, where the client (computer) is requesting a website using his browser, and the server is responding back with the website:
As we can see in the preceding image, the client is requesting a website from the server and the server serves that webpage to the client; thus, we have two communication directions and two arrows. The user may be using a desktop PC or mobile phone; he may also be using Firefox, Google Chrome, or any other browser. The server is usually a big server building similar to the preceding image but can also be a small pocket-size Raspberry Pi Zero W board. The important thing is that we always have a client who requests things and a server ready to respond if of course the client is authorized to receive these files. In this chapter, the client will be us or anyone in the world, and the server will be our Raspberry Pi Zero W board. Now, let's see some options we normally have when we buy a hosting package.

Hosting services

Usually, the big hosting services have more than one solution. This is because we all have different needs. People have different needs; thus, almost everyone has different packages; for example, you may have a few MB of the total space, or have unlimited space and one database, or more features such as one click WordPress installation, and more. Depending on your needs, you obviously choose a service with the lowest cost for your company or your personal need. Next, you can see an image from Top Host displaying the hosting services they provide:
As you can see, there are four options: in the first, you have one dynamic site; in the second, five dynamic sites; in the third, unlimited; and in the last, you have everything. Obviously, not every hosting company provides all the services from the image but they all have the same logic. Generally speaking, if you want to host some files or a website of a total size < 500 MB, you should be fine and the cost is not too much. However, if you want to host a website for a company such as an e-shop or similar, you need to invest in a good server such as the preceding one. It should be clear that when you have a company, you do not host your e-shop on a Raspberry Pi Zero W board. It may work but you have zero user reliability or support.

Domain name

Another thing to consider before completing your purchase is the selection of your domain name. As we will discuss in later sections, apart from web hosting, we need a domain name so that people can remember our website. Servers and, as a result, websites have an IP Address. This means that the facebook.com website has an IP address, such as 157.240.9.35. Imagine if there was no facebook.com and all users had to type 157.240.9.35 every single time they wanted to use the website. There is no way that the internet could have such dimensions as it has today using this kind of interaction with servers and requesting websites. To conclude, this is the reason that we came up with domain names; each website has a domain name that obviously is easier to remember since it consists of letters. Picking your domain name may be straightforward, but there are some things that you should consider before paying for it. As we said, a domain name is something similar to facebook.com, linkedin.com, vasilistzivaras.gr, or anything that makes your website unique in the world. There is no domain name that corresponds to two websites. First of all, it is important to know that a domain name is quite important for Search Engine Optimization (SEO). SEO means that the name of the website is a variable in the Google search algorithm. If we do not want to make it available to the internet and we need the website for personal use, that is OK and you probably do not have to buy a domain name, as I think that you can remember an IP address. However, if you are creating a website to be made available to the entire internet and adding it to Google's search engine result list, then the URL or the domain name should be something that really represents your website; for example, it is stupid to have a website about clothes with the domain name catsanddogs.com. At this point, I should say that many hosting providers give you free hosting for a small website when buying a domain name. This is how I, personally, have developed my website vasilistzivaras.gr.

DNS

Furthermore, it is important to introduce another term relevant to web hosting and domain names. We do not have to buy anything here, but it is crucial to know what a DNS does. We talked about web hosting, so there is a computer that hosts our files. We also talked about the domain name, so there is a URL or a name that corresponds to our server's IP address. When a client types our domain name in a web browser, the computer needs to know the IP address. So, a Domain Name Server (DNS) is a system that matches IP addresses with domain names. This is not something that we have to buy, but is something that we or our website administration needs to set up.

Setup

Now, let's see what happens after we buy a hosting service. At this point, you should have an IP address for your website, username, and password. You should go to the link that is contained in your verification email and after the login, you are prompted to pdesk or some other interface on which you can set up your hosting and domain names. I will define a list with the actions we need to perform and later on, in further sections, we will discuss solutions for this kind of action-issue. So, after buying a website, you need to:
  • Transfer your files or website to the hosting server
  • Set up DNS according to your domain name
If you are familiar with web development, you must have already come up with some questions. There are some issues born here; for example, how will we transfer the files to the hosting service? Usually, drag and drop works but not always, especially in our Raspberry Pi Zero W board but we will discuss this subject later. Next, how do we match the domain name with the server IP address? Furthermore, what if I want to make a minor change? Do I have to upload all the files again? As you can see, web hosting requires some experience and is not straightforward for many users out there. This is why many hosting services have a live support 24/7 and a ticket troubleshooting page.

Client-server communication

Now that you know what web hosting is, you should have qu...

Table of contents