How To Make A Remote Viewable Camera With Raspberry Pi (Beginner Project)

How To Make A Remote Viewable Camera With Raspberry Pi (Beginner Project)

Hi, this is Wayne again with a topic “How To Make A Remote Viewable Camera With Raspberry Pi (Beginner Project)”.
This is a camera, live stream from a raspberry pi, and what you’re seeing is the output of a raspberry, pi camera module and to get started? All you need is a raspberry pi and the pi camera module in this article. We’Re going to build our raspberry pi camera stream and we’re taking from the very beginning. So if you have a raspberry pi hanging around, this can be an interesting start. Hi. My name is evan and i make diy projects on my youtube channel, ranging from smart mirrors to electric skateboards, to even smart cctv cameras and, by the end of this video you’ll, be able to create your own raspberry pi, live stream and see the live footage on Your client device, whether it’s your tablet or your phone, and i’m here with me – to provide a tutorial on how to create your own raspberry, pi camera stream.

So, let’s get to it the overview. The part list. The first thing we’ll need is a raspberry pi, we’re using the pi 4 in this case and also a pi camera module. We’Ll also need a micro sd card, a micro sd card adapter, a pi 4 enclosure, a raspberry pi, 4 charger, make sure it’s usbc, a micro, hdmi, cable and since we’re doing the desktop setup, we’ll need a keyboard and a mouse. You can find the parts in the article below we’re going to use the monitor for the display and an ethernet cable is optional for a wired connection. This is where the pi comes in now. Essentially, a raspberry pi is a computer, but it’s credit card size because of its small form, factor low power, consumption and relatively low cost. This makes it ideal for diy projects like the pi camera stream.

How To Make A Remote Viewable Camera With Raspberry Pi (Beginner Project)

You can see the usb peripheral ports on the side of the pi and, if you flip it over, we have the micro sd slot to load in the operating system. Let’S get to building assembly of parts the camera build now in order to complete the setup, we’ll need a pi camera module and a raspberry pi. Now the pi camera module comes with a ribbon cable, we’re going to insert the ribbon cable inside the camera port of the raspberry pi by unhinging, the latches of the camera port and inserting the cable inside. We can now finally press down on the latches to make sure the ribbon cable is secure, and this is the final build we recommend put inside the enclosure. This will give an extra layer of security and protection as well as it’s more easier to handle, plus the camera module has its own dedicated stand. This is the final version of the build now that we put the pi camera build together.

The question is: how does it work and what’s the theory behind it, how it works? The theory we’re capturing live footage from the raspberry pi builds as a video streaming server and using flask to create a live stream to our client device with the pi camera and here’s the example of the stream. Now flask is a great web framework for this project, because it’s lightweight, leading to low latency devices connected to the same network of the pi, would be able to visit the url and see the live footage of the stream. Where there’s a single device or multiple devices, and since it’s displaying a web page we’re able to fully customize it, making it interactable? Well, that’s enough theory: let’s get to setting up an etching the os onto the sd card, we’re now going to etch the pi os. We’Re going to do this by inserting the sd card into the adapter and plugging it into the usb port of the pc, and eventually it will load now heading off to the raspberry pi dot org site, we’re going to click on downloads and download the latest raspberry Pi os we’re going to download the zip now while we do that, we’re going to also download the etcha software – and this is also available for mac and windows. Now that they’re both downloaded we’re going to unzip the pi os image file and also install the extra software we can do this by dragging into the applications for mac. Now.

Opening the edger software we’re going to locate our raspberry pi os image file and select a target being our micro sd card being 32 gig and we’re gon na flash. Now this process can take up to 15 minutes. Once that’s completed, you may see a new drive by the name of boot and once that’s done, we’ve successfully etched the pi os onto the micro sd card. Now we’re gon na unplug the usb and take the micro sd card of the freshly installed os and plug it into the micro sd card slot of the raspberry pi 4.. Now, since we’re using the desktop setup, we’re going to use the mouse and keyboard as well as a monitor, now we’re going to use a micro, hdmi cable to plug it into the micro hdmi port of the raspberry pi and the other end into our monitor. Hey you are you subscribed to make magazine? Yet if you like this kind of video of projects and stuff to build, you are gon na love, make magazine, it comes out quarterly and it is packed full of tips and tricks, full projects that you can recreate and feature pieces explaining.

How To Make A Remote Viewable Camera With Raspberry Pi (Beginner Project)

How makers are changing the world for the better? You can find information on how to subscribe in a multitude of ways, digital or get the actual print edition in your mailbox. At the link above the link below in the description now back to the video, the keyboard and mouse can be plugged into the raspberry pi. Usb ports, just like any other computer and lastly, we’re gon na supply some power with the usb c port, and you can see that the setup pretty much resembles a desktop pc, we’re now going to turn on the pi. Now, if you stop here, you pretty much completed the setup of a typical raspberry pi desktop, but we’re going to take it one step further and complete the setup of the raspberry pi camera stream.

Now we got the pi up and running we’re going to complete the setup wizard. We can do this by clicking next and selecting our country. We can also select our wi-fi network. In this example, i’ve already got it connected we’re going to skip on updating for later. Now we’re going to open a terminal window and using sudo raspberry config we’re going to get into the settings and enable the camera port. So we can use the pi camera module and the next part is we’re going to enable vnc. Now taking the ip address of your pi, you can now access the same pi from the display of another pc without the need of a monitor. This will work out in the long run for this project, as you won’t need to hook up your pc every time you want to make a change to the pi. Now that we’ve accessed the pi over vnc. The first thing we’re going to do is take a picture of the pi to make sure the pi camera module is working. Now that we’ve verified the camera modules working we’re now going to install the library dependencies and the git repo.

Now this kit repo allows you to create a live stream over flask, there’s more information on how it works in the article in the description below we’re now going to install the library dependencies. So we’re going to open a new terminal window and copy and paste the commands. The very first two commands will update and upgrade our existing dependencies. We’Re now going to install the rest of it. Now this process can vary depending on your raspberry pi build. You also.

Might find some dependencies have already been installed and it’s also good practice to create your own local python environment, but we’ll leave this out for now now we’re going to clone the raspberry pi camera stream and, as you can see in the pi folder it’s empty now, Opening a new terminal we’re going to copy and paste the command. This will get cloned the repo into our home directory and, as you can see, the pi camera stream flask is available now going into it. You’Ll see a number of dependencies, the main one being camera.py, which would give us access to the pi camera module, the main.py and also the templates, and in the templates we have the index.html which loads the website. The main.py is what creates the flash server? You can find more information on this in the article below what we’re going to do right now is run the main.py, and you can see the output now going into our browser and typing in the url of the pi. With colon port 5000, we’re going gon na see the stream, and here it is, you can see.

How To Make A Remote Viewable Camera With Raspberry Pi (Beginner Project)

The performance of the stream is quite good. However, the latency can vary depending on your internet connection and coverage, and here are other objects, we’re just going to stop the pi stream and if you don’t want to use the ide and rather use the terminal to access the pi stream. We can do this by opening a terminal command and copy and pasting this specific command. The following command shows python 3 and the file path to the main.py, and we can verify this by running the url again and as a bonus.

If you would like to auto start your pi stream as soon as it turns on without the need of a running a command, this next part addresses it now. This is totally optional and there’s different ways to do this, but in this way we’re gon na go into the profile script and copy and paste the same python command and hit ctrl x and y to save the script. And this approach does give us a headless setup which does improve the performance of the pi stream, but, as a result, we need to enable ssh on the pi.

This can be found in the interfacing options and ssh. Now that’s done we’re going to reboot the pi, and now we can access the pi using the terminal from a different pc, and we can verify here that we’ve got access and, finally to test that the pi stream is working. We’Re going to access this on a different device and it looks good and that’s pretty much all this here covers the basics, but you can take it one step further and build applications such as a portable body, camera or even a smart cctv camera with face recognition Featuring the new pi high quality camera, the real world applications is what makes this interesting thanks for watching this video and a big.

Thank you to me for the time you can find all the details and the get repo in the article below also subscribe to make for more content. And if you like my type of content of diy projects, you can find my channel in the links below as well. Thanks for watching peace, you .