{"id":2047,"date":"2020-09-20T17:31:49","date_gmt":"2020-09-20T09:31:49","guid":{"rendered":"https:\/\/www.techcoil.com\/blog\/?p=2047"},"modified":"2021-05-08T13:19:37","modified_gmt":"2021-05-08T05:19:37","slug":"how-to-use-a-raspberry-pi-zero-w","status":"publish","type":"post","link":"https:\/\/www.techcoil.com\/blog\/how-to-use-a-raspberry-pi-zero-w\/","title":{"rendered":"How to use a Raspberry Pi Zero W?"},"content":{"rendered":"<p>After figuring out <a href=\"https:\/\/www.techcoil.com\/blog\/why-buy-the-raspberry-pi-zero-w\/\" rel=\"noopener\" target=\"_blank\">why you will want to get a Raspberry Pi Zero W<\/a>, you may wonder how you can use it.<\/p>\n<p>Given that, this post shows how you can use a Raspberry Pi Zero W in your next <a href=\"https:\/\/www.techcoil.com\/glossary\/internet-of-things\/\" target=\"_blank\" rel=\"noopener\">IoT<\/a> project.<\/p>\n<p>At a glance, using a Raspberry Pi Zero W involves the following steps:<\/p>\n<ol>\n<li>Getting a Raspberry Pi Zero W board with or without GPIO header<\/li>\n<li>Using a camera with your Raspberry Pi Zero W<\/li>\n<li>Getting GPIO extensions for your Raspberry Pi Zero W<\/li>\n<li>Buying or building a case for your Raspberry Pi Zero W<\/li>\n<li>Displaying HDMI output of your Raspberry Pi Zero W onto a monitor screen<\/li>\n<li>Connecting USB peripherals to your Raspberry Pi Zero W<\/li>\n<li>Buying the microSD card to install the operating system to run your Raspberry Pi Zero W<\/li>\n<li>Deciding on the operating system to run on your Raspberry Pi Zero W<\/li>\n<li>Bringing your Raspberry Pi Zero W to life<\/li>\n<li>Configuring your Raspberry Pi OS<\/li>\n<li>Installing applications that others had built<\/li>\n<li>Using a programming language to build your own application<\/li>\n<li>Running your application as a daemon<\/li>\n<\/ol>\n<h2>1. Getting a Raspberry Pi Zero W board with or without GPIO header<\/h2>\n<p>When you are not sure whether you need the GPIO header pins, you can buy one without the pins first. If your board don't have a GPIO header, then your IoT project can take a smaller form factor.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberry-pi-zero-w-board-with-camera-csi-connector-clip-loosened.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero W board with camera csi connector clip loosened\"><\/p>\n<p>If you need to connect to the GPIO pins, then you can have the flexibility to do so later.<\/p>\n<p>Since there are metal conductors at both sides of the board, you can solder header pins on either side.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Zero-W-front-and-back-with-gpio-connectors-highlighted.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero W front and back with gpio connectors highlighted\"><\/p>\n<p>In addition, you can choose the type of header pins. For example, you can choose to solder male or female <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=GPIO+header&ref=nb_sb_noss&linkCode=ll2&tag=clivsperswebs-20&linkId=22981e8f30e124f0cdf5f0339be16e9d&language=en_US\" rel=\"noopener\" target=\"_blank\">GPIO header<\/a> on the top or bottom of the board.<\/p>\n<p>If you are only using a few of the GPIO connections, then you may solder the wires directly onto the connection points.<\/p>\n<h2>2. Using a camera with your Raspberry Pi Zero W<\/h2>\n<p>If you are going to capture images with your Pi Zero W, then you will need a camera.<\/p>\n<p>Since there is a Camera Serial Interface (CSI) on your Pi Zero W, it is best to get a camera to connect to that interface.<\/p>\n<p>In order for such a camera to connect to your Raspberry Pi Zero W, you will need a <a href=\"https:\/\/www.amazon.com\/Arducam-1-0mm-Camera-Raspberry-Version\/dp\/B076Q595HJ\/?&_encoding=UTF8&tag=clivsperswebs-20\" target=\"_blank\" rel=\"noopener\">cable like this<\/a>. If you are getting a <a href=\"https:\/\/www.amazon.com\/CanaKit-Raspberry-Wireless-Official-Supply\/dp\/B071L2ZQZX\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=bb82a0298e1b003cefa7333a46d8aa17&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Zero W kit<\/a> or the official case, then a cable may be included in the package.<\/p>\n<p>In case you are wondering, this is <a href=\"https:\/\/www.techcoil.com\/blog\/connect-raspberry-pi-camera-module-raspberry-pi-zero-w-official-case\/\" rel=\"noopener\" target=\"_blank\">how a CSI camera is connected to the Raspberry Pi Zero W board<\/a>:<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberry-pi-zero-w-board-with-camera-cable-slotted-into-csi-connector.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero W board with camera cable slotted into CSI connector\"><\/p>\n<p>Given that you have the ribbon cable, there are several types of camera that you can use:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.amazon.com\/Raspberry-Pi-Camera-Module-Megapixel\/dp\/B01ER2SKFS\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=2c86fa49fe483715aaf2e51a4e2e42e5&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Camera Module V2<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/Raspberry-Camera-Vision-IR-Cut-Longruner\/dp\/B07VSPSNL8\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=3ea02548e43e663d9f19a2a309fe598d&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Camera Day & Night Vision<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/Arducam-Camera-Raspberry-Interchangeable-LS-2717CS\/dp\/B013JV4Z7K\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=685bfb03097650b7319f077eed82f055&language=en_US\" rel=\"noopener\" target=\"_blank\">Arducam Noir Camera<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/Arducam-Autofocus-Raspberry-Motorized-Software\/dp\/B07SN8GYGD\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=1992bd36da1b6f114c1d791efe6d1304&language=en_US\" rel=\"noopener\" target=\"_blank\">Arducam Auto Focus Pi Camera<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/Raspberry-Camera-IMX219-Degrees-Replacement\/dp\/B08BYNXC5Q\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=9247c017cdbf397299635162cb41f27e&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi 8MP Camera IMX219 Sensor Wide Angle 160 Degrees Fov Camera Module Replacement<\/a> + <a href=\"https:\/\/www.amazon.com\/Raspberry-Pi-Camera-Module-Megapixel\/dp\/B01ER2SKFS\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=2c86fa49fe483715aaf2e51a4e2e42e5&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Camera Module V2<\/a><\/li>\n<\/ul>\n<p>Bear in mind that the camera you choose affects the kind of case that you can buy. <\/p>\n<p>If you choose a camera with augmented lens or peripherals, then you will probably have to build your own case. In this situation, you may choose to build your case with a <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=3D+printer&ref=nb_sb_noss&linkCode=ll2&tag=clivsperswebs-20&linkId=49931ab96ade5475fd894ddc9dc85cb6&language=en_US\" rel=\"noopener\" target=\"_blank\">3D printer<\/a>, some <a href=\"https:\/\/www.amazon.com\/LEGO-Classic-10717-Bricks-Piece\/dp\/B07G4R3HD5\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=ebab318290a2fbb1e753efe214b7d617&language=en_US\" rel=\"noopener\" target=\"_blank\">LEGO blocks<\/a>, wood or recycled materials.<\/p>\n<h2>3. Getting GPIO extensions for your Raspberry Pi Zero W<\/h2>\n<p>If you solder male pins on the top of your Raspberry Pi Zero W, then you can use many of the <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=raspberry+pi+zero+GPIO+HAT+extensions&ref=nb_sb_noss&linkCode=ll2&tag=clivsperswebs-20&linkId=5976a86bc3bd7bf214606d08b2d2c489&language=en_US\" rel=\"noopener\" target=\"_blank\">GPIO HAT extensions in the market<\/a>.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Zero-W-top-view-with-male-GPIO-header-pins.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero W top view with male GPIO header pins\"><\/p>\n<p>For example, you can attach a <a href=\"https:\/\/www.amazon.com\/pzsmocn-2-7inch-Raspberry-Interface-SPI%C2%A14-Wire\/dp\/B074Z4SQBT\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=cae623d391dc57eb6671a84a0a276daa&language=en_US\" rel=\"noopener\" target=\"_blank\">2.7inch E-Ink Display HAT<\/a> to give your Pi Zero W a display that is energy efficient.<\/p>\n<p>In addition to that, you can use <a href=\"https:\/\/www.techcoil.com\/blog\/helpful-gpio-pinout-resources-that-you-can-reference-while-connecting-sensors-to-your-raspberry-pi-3\/\" rel=\"noopener\" target=\"_blank\">the GPIO references<\/a> as they are.<\/p>\n<h2>4. Buying or building a case for your Raspberry Pi Zero W<\/h2>\n<p>If you are looking for a ready-to-use case, then you can look at the <a href=\"https:\/\/www.amazon.com\/Official-Raspberry-Pi-Zero-Case\/dp\/B06Y593MHV\/ref=as_li_ss_tl?dchild=1&keywords=Official+Pi+Zero+case&qid=1600575567&sr=8-1&linkCode=ll1&tag=clivsperswebs-20&linkId=68cf159884c33244a921f906c874fa5b&language=en_US\" rel=\"noopener\" target=\"_blank\">Official Pi Zero case<\/a>.<\/p>\n<p>In order to cater for several use cases for your Pi Zero W, 3 different lids are included.<\/p>\n<p><a href=\"https:\/\/www.amazon.com\/Official-Raspberry-Pi-Zero-Case\/dp\/B06Y593MHV\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=ca7fe7ba10ba3724bfef0b0872a44805&language=en_US\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Zero-Official-Case-contents.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero Official Case contents\"><\/a><br \/>\nIf you are using a Raspberry Pi camera with the same form factor as the <a href=\"https:\/\/www.amazon.com\/Raspberry-Pi-Camera-Module-Megapixel\/dp\/B01ER2SKFS\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=2c86fa49fe483715aaf2e51a4e2e42e5&language=en_US\" rel=\"noopener\" target=\"_blank\">camera v2<\/a>, then you will be able to use the camera lid.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberry-pi-zero-official-case-with-camera-module-and-zero-w-board.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero Official Case with Camera Module and Zero W board\"\/><\/p>\n<p>However, in order to use the camera lid properly, either you leave out the GPIO headers or solder them on the bottom.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Underside-of-Raspberry-Pi-Zero-Official-case-with-RPi-Zero-W.jpg\" class=\"aligncenter\" alt=\"Underside of Raspberry Pi Zero Official case with RPi Zero W\"\/><\/p>\n<p>If you solder the GPIO headers at the top, then you cannot close the camera lid properly.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Zero-W-with-GPIO-header-soldered-on-top-and-camera-lid.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero W with GPIO header soldered on top and camera lid\"\/><\/p>\n<h2>5. Displaying HDMI output of your Raspberry Pi Zero W onto a monitor screen<\/h2>\n<p>Since the Raspberry Pi Zero W is trading off power with cost, you may not want to use the HDMI output in your project.<\/p>\n<p>However, if you wish to check out the HDMI output of your Pi Zero W, you can get a <a href=\"https:\/\/www.amazon.com\/UGREEN-Compatible-Raspberry-Camcorder-Projector\/dp\/B00B2HOS08\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=75f14be718feee6a355a08ea578284fc&language=en_US\" rel=\"noopener\" target=\"_blank\">mini HDMI adapter<\/a>.<a href=\"https:\/\/www.amazon.com\/UGREEN-Compatible-Raspberry-Camcorder-Projector\/dp\/B00B2HOS08\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=75f14be718feee6a355a08ea578284fc&language=en_US\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Ugreen-mini-HDMI-adapter.jpg\" alt=\"Ugreen mini HDMI adapter\" class=\"aligncenter\" \/><\/a><\/p>\n<h2>6. Connecting USB peripherals to your Raspberry Pi Zero W<\/h2>\n<p>If you wish to connect USB peripherals to your Pi Zero W, then you can the micro USB port.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Zero-W-with-USB-OTG-port-highlighted.jpg\" alt=\"Raspberry Pi Zero W with USB OTG port highlighted\" class=\"aligncenter\" \/><\/p>\n<p>When you want to connect only 1 peripheral, you can use <a href=\"https:\/\/www.amazon.com\/UGREEN-Adapter-Samsung-Controller-Smartphone\/dp\/B00LN3LQKQ\/r\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=ab7fdc8a53c886eb43de2e0f8f1dda19&language=en_US\" rel=\"noopener\" target=\"_blank\">Micro USB 2.0 OTG Cable<\/a>.<a href=\"https:\/\/www.amazon.com\/UGREEN-Adapter-Samsung-Controller-Smartphone\/dp\/B00LN3LQKQ\/r\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=ab7fdc8a53c886eb43de2e0f8f1dda19&language=en_US\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Ugreen-microUSB-OTG-cable.jpg\" alt=\"Ugreen microUSB OTG cable\" class=\"aligncenter\" \/><\/a><\/p>\n<p>If you wish to connect more peripherals, you can use a <a href=\"https:\/\/www.amazon.com\/MakerSpot-Accessories-Charging-Extension-Raspberry\/dp\/B01JL837X8\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=0a7448c4079eafbeab45ffc0fbb22174&language=en_US\" rel=\"noopener\" target=\"_blank\">Micro USB OTG Hub<\/a> to connect up to 4.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Makerspot-charging-extension.jpg\" alt=\"Makerspot charging extension\" class=\"aligncenter\" \/><\/p>\n<h2>7. Buying the microSD card to install the operating system to run your Raspberry Pi Zero W<\/h2>\n<p>In order to run the Raspberry Pi Zero W, we will need to install an operating system into a microSD card.<\/p>\n<p>Typically, we will get a <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=class+10+microSD+card&i=electronics&ref=nb_sb_noss&linkCode=ll2&tag=clivsperswebs-20&linkId=fb1d7e981e822334d2762a7460eaba90&language=en_US\" rel=\"noopener\" target=\"_blank\">class 10 microSD card<\/a>.<\/p>\n<p>If you want to store all your data on your Pi Zero W, then you can consider getting one of considerable size. For example, if you want to <a href=\"https:\/\/www.techcoil.com\/blog\/how-to-setup-a-raspberry-pi-security-camera-with-motioneyeos\/\" rel=\"noopener\" target=\"_blank\">build a Raspberry Pi security camera<\/a>, then you can get a <a href=\"https:\/\/www.amazon.com\/SanDisk-Endurance-microSDXC-Adapter-Monitoring\/dp\/B07NY23WBG\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=d6bdbec8b00bfabb685e4ddbd59763a9&language=en_US\" rel=\"noopener\" target=\"_blank\">128GB microSD card<\/a>.<\/p>\n<p>If your work computer have an in-built SD card reader, then you will need to get a <a href=\"https:\/\/www.amazon.com\/Anker-Portable-Reader-RS-MMC-Micro\/dp\/B006T9B6R2\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=17b7a7ece34c326d1d3f5a9328071ba6&language=en_US\" rel=\"noopener\" target=\"_blank\">SD card adapter<\/a>.<\/p>\n<h2>8. Deciding on the operating system to run on your Raspberry Pi Zero W<\/h2>\n<p>Typically, we choose an operating system without the windowing system to run our Pi Zero W. In addition, we have to decide between using it for multiple use cases or dedicating it to serve a single purpose.<\/p>\n<p>When you use the <a href=\"https:\/\/downloads.raspberrypi.org\/raspios_lite_armhf_latest\" rel=\"noopener\" target=\"_blank\">Raspberry Pi OS (32-bit) Lite<\/a>, you have more control over the kind of software that you can install. For example, you may want your Raspberry Pi Zero W to function as a <a href=\"https:\/\/www.techcoil.com\/blog\/the-reverse-proxy-server\/\" rel=\"noopener\" target=\"_blank\">reverse proxy server<\/a> and a security camera. In such a situation, you may <a href=\"https:\/\/www.techcoil.com\/blog\/how-to-setup-a-raspberry-pi-security-camera-for-home-surveillance-with-raspbian-buster-lite-and-motioneye\/\" rel=\"noopener\" target=\"_blank\">build your security camera with a version of the Raspberry Pi OS Lite<\/a>.<\/p>\n<p>On the other hand, you may want to use your Raspberry Pi Zero W as a security camera only. In this situation, it is easier to <a href=\"https:\/\/www.techcoil.com\/blog\/how-to-setup-a-raspberry-pi-security-camera-with-motioneyeos\/\" rel=\"noopener\" target=\"_blank\">install motionEyeOS on your Raspberry Pi Zero W to build your security camera<\/a> instead. <\/p>\n<h2>9. Bringing your Raspberry Pi Zero W to life<\/h2>\n<p>Once you have the hardware parts, you can then bring your Raspberry Pi Zero W to life. In order to do so, you typically go through the following steps:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.raspberrypi.org\/downloads\/\" rel=\"noopener\" target=\"_blank\">download<\/a> the <strong>Raspberry Pi imager<\/strong> and install it onto your work computer.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Imager-v1.4-starting-screen.gif\" class=\"aligncenter\" alt=\"Raspberry Pi Imager v1.4 starting screen\"><\/li>\n<li>choose an operating system to run your Raspberry Pi Zero W. <img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Imager-1.4-operating-system-selection-list.gif\" class=\"aligncenter\" alt=\"Raspberry Pi Imager 1.4 operating system selection list\">If the operating system is not in the list, then you will need to download it and choose the <strong>use custom<\/strong> option.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Imager-v1.4-operating-system-selection-list-with-use-custom-option-highlighed.gif\" class=\"aligncenter\" alt=\"Raspberry Pi Imager v1.4 operating system selection list with use custom option highlighed\"><\/li>\n<li>install the operating system onto your microSD card.<\/li>\n<li>create a <code>.ssh<\/code> file in the root directory of the microSD card to enable the ssh server on an operating system like Raspberry Pi OS if you want to administer your Pi Zero W remotely.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/root-directory-of-Raspberry-Pi-OS-lite-with-ssh-file-highlighted.gif\" class=\"aligncenter\" alt=\"root directory of Raspberry Pi OS lite with ssh file highlighted\"><\/li>\n<li>create a <code>wpa_supplicant.conf<\/code> root directory of the microSD card to connect Pi Zero W to your home network via a WiFi <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=home+router&ref=nb_sb_noss&linkCode=ll2&tag=clivsperswebs-20&linkId=140263e091403f8bbe647f4d5176effc&language=en_US\" rel=\"noopener\" target=\"_blank\">router<\/a> on first boot. Note that your Raspberry Pi Zero W can only connect to a 2.4 GHz WiFi network. <img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/root-directory-of-Raspberry-Pi-OS-lite-with-wpa_supplicant-file-highlighted.gif\" class=\"aligncenter\" alt=\"root directory of Raspberry Pi OS lite with wpa_supplicant file highlighted\"><\/li>\n<li>remove microSD card from your work computer and insert it into the microSD card slot of your Pi Zero W.<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspberry-Pi-Zero-W-with-a-Sandisk-128GB-microSD-card.jpg\" class=\"aligncenter\" alt=\"Raspberry Pi Zero W with a Sandisk 128GB microSD card\"><\/li>\n<li>plug in a <a href=\"https:\/\/www.amazon.com\/TUSITA-Adaptor-Charging-Adapter-Raspberry\/dp\/B00LTHBCNM\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=1c15f02c6b204a8ffb3588e1f0bf9c88&language=en_US\" rel=\"noopener\" target=\"_blank\">Micro USB HUB Adaptor<\/a> for multiple USB peripherals to interact with the Pi Zero W if needed.<\/li>\n<li>plug in a <a href=\"https:\/\/www.amazon.com\/SunFounder-Raspberry-Display-Portable-1920x1080\/dp\/B07NNXH2SS\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=47e6fe137e2d1cb8cbb4a19c2a32e7fb&language=en_US\" rel=\"noopener\" target=\"_blank\">HDMI monitor<\/a> through a <a href=\"https:\/\/www.amazon.com\/UGREEN-Compatible-Raspberry-Camcorder-Projector\/dp\/B00B2HOS08\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=eefd16f19d937c8145a468dd1d654c03&language=en_US\" rel=\"noopener\" target=\"_blank\">Mini HDMI Adapter<\/a> and a <a href=\"https:\/\/www.amazon.com\/UGREEN-Ethernet-Compatible-Nintendo-Computer\/dp\/B01KNKVZ8M\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=484e9d6abe01e69d60523e72d4c11d2d&language=en_US\" rel=\"noopener\" target=\"_blank\">standard HDMI cable<\/a> if needed.<\/li>\n<li>attach a CSI camera through a <a href=\"https:\/\/www.amazon.com\/Arducam-1-0mm-Camera-Raspberry-Version\/dp\/B076Q595HJ\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=c9a9e7e2e3d182e396d7c3cd42bdabb0&language=en_US\" rel=\"noopener\" target=\"_blank\">15 Pin 1.0mm Pitch to 22 Pin 0.5mm Camera Cable<\/a> if needed.<\/li>\n<li>attach conventional sensors to your Pi Zero W to make sense of the real world if needed. As I had noted before, you will need a <a href=\"https:\/\/www.amazon.com\/Soldering-Iron-Kit-Temperature-Desoldering\/dp\/B07S61WT16\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=3a777f62c6d832dca8d5b9a096ab5723&language=en_US\" rel=\"noopener\" target=\"_blank\">soldering iron kit<\/a> if you got the board without header pins.<\/li>\n<li>plug a <a href=\"https:\/\/www.amazon.com\/CanaKit-Raspberry-Supply-Adapter-Listed\/dp\/B00MARDJZ4\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=2c0cb1d4561c53211230b59ccd3cc593&language=en_US\" rel=\"noopener\" target=\"_blank\">microUSB power adapter<\/a> to your Pi Zero W and supply power to it.<\/li>\n<\/ol>\n<h2>10. Configuring your Raspberry Pi OS<\/h2>\n<p>If you had installed the Raspberry Pi OS, enabled SSH and connected WiFi on your Pi Zero W, then you can use your work computer to access it via the same network.<\/p>\n<p>When you do so, you will be able to configure your Raspberry Pi OS through your work computer.<\/p>\n<p>If this is your first Raspberry Pi OS setup, then you can find the IP address of your Raspberry Pi Zero W by running the following command on your work computer:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nping raspberrypi\r\n<\/pre>\n<p>When you have multiple Raspberry Pis in your house, you can also find the IP address through your router's network map.<\/p>\n<p>Once you got the IP address of your Raspberry Pi Zero W, you can then SSH into it. For example, you will run the following command if your Pi Zero W is given <strong>192.168.1.115<\/strong> as its IP address:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nssh pi@192.168.1.115\r\n<\/pre>\n<p>When you are prompted for the password for the <strong>pi<\/strong> user, enter <strong>raspberry<\/strong>. <\/p>\n<p>Given that, you will be able to configure your Raspberry Pi OS through your work computer.<\/p>\n<p>At this point in time, you can use the Raspberry Pi Software Configuration tool to help you with the configurations:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo raspi-config\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/20191022-raspi-config-just-started-up.gif\" alt=\"20191022 raspi-config just started up\" class=\"aligncenter\" \/><\/p>\n<h2>11. Installing applications that others had built<\/h2>\n<p>Once you had performed some configurations, you may want to install some applications on your Pi Zero W.<\/p>\n<p>Since Raspberry Pi OS is based on Debian, you can use the <a href=\"https:\/\/www.debian.org\/doc\/manuals\/debian-faq\/pkgtools.en.html\" rel=\"noopener\" target=\"_blank\">Debian package management tools<\/a> to install applications that you can leverage on.<\/p>\n<p>For example, you may want to leverage Nginx to host images that your Pi Zero W captures as a <a href=\"https:\/\/www.techcoil.com\/glossary\/static-website\/\" rel=\"noopener\" target=\"_blank\">static website<\/a>. In this case, you can install Nginx with the following commands:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt-get update\r\nsudo apt install nginx -y\r\n<\/pre>\n<h2>12. Using a programming language to build your own application<\/h2>\n<p>If you want to write your own application, then you will need to learn how to use a programming language.<\/p>\n<p>When you choose an operating system like Raspberry Pi OS, you will have a myriad of programming languages to choose from.<\/p>\n<p>Since Python is a versatile programming language, I will recommend <a href=\"https:\/\/www.techcoil.com\/blog\/how-to-use-your-raspberry-pi-for-python-development\/\" rel=\"noopener\" target=\"_blank\">using Python to build the application that you need<\/a>.<\/p>\n<p>Another popular programming language that Raspberry Pi builders like is <a href=\"https:\/\/nodejs.org\/\" rel=\"noopener\" target=\"_blank\">Node.js<\/a>.<\/p>\n<p>Once you had developed your application on your computer, you can then send your codes to your Raspberry Pi Zero W via SSH.<\/p>\n<p>For example, I can run the following command to send the entire <code>\/python-app<\/code> directory on my work computer to the home directory of the Pi user on my Raspberry Pi OS:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nscp -r \/python-app pi@192.168.1.115:~\/\r\n<\/pre>\n<h2>13. Running your application as a daemon<\/h2>\n<p>If you leave your Raspberry Pi Zero W running 24\/7, then you will want your application to run as a daemon.<\/p>\n<p>Since systemd is included in Raspberry Pi OS, you can use it to run an application as a daemon.<\/p>\n<p>For example, in <a href=\"https:\/\/www.techcoil.com\/blog\/how-to-put-your-raspberry-pi-server-on-the-internet-with-ngrok\/\" rel=\"noopener\" target=\"_blank\">how to put your Raspberry Pi server on the internet with ngrok<\/a>, I had shown how we can run the ngrok client as a daemon with systemd. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/How-to-use-a-Raspberry-Pi-Zero-W.jpg\" alt=\"How to use a Raspberry Pi Zero W\" class=\"aligncenter\" \/><\/p>\n\n      <ul id=\"social-sharing-buttons-list\">\n        <li class=\"facebook\">\n          <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwp.me%2Fp245TQ-x1\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n            <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Facebook.png\" alt=\"Facebook icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"twitter\">\n          <a href=\"https:\/\/twitter.com\/intent\/tweet?text=&url=https%3A%2F%2Fwp.me%2Fp245TQ-x1&via=Techcoil_com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Twitter.png\" alt=\"Twitter icon\"> Tweet\n          <\/a>\n        <\/li>\n        <li class=\"linkedin\">\n          <a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=1&title=&url=https%3A%2F%2Fwp.me%2Fp245TQ-x1&source=https:\/\/www.techcoil.com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/linkedin.png\" alt=\"Linkedin icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"pinterest\">\n          <a href=\"https:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fwww.techcoil.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F2047&description=\" class=\"pin-it-button\" target=\"_blank\" role=\"button\" rel=\"nofollow\" count-layout=\"horizontal\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Pinterest.png\" alt=\"Pinterest icon\"> Save\n          <\/a>\n        <\/li>\n      <\/ul>\n    ","protected":false},"excerpt":{"rendered":"<p>After figuring out <a href=\"https:\/\/www.techcoil.com\/blog\/why-buy-the-raspberry-pi-zero-w\/\" rel=\"noopener\" target=\"_blank\">why you will want to get a Raspberry Pi Zero W<\/a>, you may wonder how you can use it.<\/p>\n<p>Given that, this post shows how you can use a Raspberry Pi Zero W in your next <a href=\"https:\/\/www.techcoil.com\/glossary\/internet-of-things\/\" target=\"_blank\" rel=\"noopener\">IoT<\/a> project.<\/p>\n","protected":false},"author":1,"featured_media":653,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[4],"tags":[196,240,409],"jetpack_featured_media_url":"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberry-pi-zero-w-board-with-camera-csi-connector-clip-loosened.jpg","jetpack_shortlink":"https:\/\/wp.me\/p245TQ-x1","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/2047"}],"collection":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/comments?post=2047"}],"version-history":[{"count":0,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/2047\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media\/653"}],"wp:attachment":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media?parent=2047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/categories?post=2047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/tags?post=2047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}