{"id":28281717,"url":"https://github.com/codytolene/pocket-pi","last_synced_at":"2025-06-17T00:31:37.463Z","repository":{"id":243420870,"uuid":"812380105","full_name":"CodyTolene/Pocket-Pi","owner":"CodyTolene","description":" Run a full Raspberry Pi OS in the palm of your hand! A simple guide to setting up a Raspberry Pi Zero 2 W with a 1.3inch IPS LCD display HAT, joystick, buttons, and battery module.","archived":false,"fork":false,"pushed_at":"2025-02-02T22:42:26.000Z","size":118002,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T00:57:40.042Z","etag":null,"topics":["3d-printing","joystick","joystick-control","pi-hat","pi-zero-w","raspberry-pi"],"latest_commit_sha":null,"homepage":"https://www.CodyTolene.com","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodyTolene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-08T18:09:34.000Z","updated_at":"2025-05-14T11:26:08.000Z","dependencies_parsed_at":"2024-06-08T19:31:44.258Z","dependency_job_id":"3799fb6d-61a5-4afb-8fbb-9839aff957a1","html_url":"https://github.com/CodyTolene/Pocket-Pi","commit_stats":null,"previous_names":["codytolene/pocket-pi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodyTolene/Pocket-Pi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTolene%2FPocket-Pi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTolene%2FPocket-Pi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTolene%2FPocket-Pi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTolene%2FPocket-Pi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodyTolene","download_url":"https://codeload.github.com/CodyTolene/Pocket-Pi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTolene%2FPocket-Pi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260268052,"owners_count":22983596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-printing","joystick","joystick-control","pi-hat","pi-zero-w","raspberry-pi"],"created_at":"2025-05-21T12:13:29.541Z","updated_at":"2025-06-17T00:31:37.453Z","avatar_url":"https://github.com/CodyTolene.png","language":null,"funding_links":["https://github.com/sponsors/CodyTolene","https://www.buymeacoffee.com/codytolene"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg align=\"center\" src=\".github/images/pocket-pi.png\" /\u003e\n  \u003ch2 align=\"center\"\u003ePocket Pi\u003c/h2\u003e\n  \u003cp align=\"center\"\u003e\n    A simple guide to setting up a Raspberry Pi Zero 2 W with a 1.3inch IPS LCD display HAT, joystick, buttons, and battery module.\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    Run a full Raspberry Pi OS in the palm of your hand!\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Index \u003ca name=\"index\"\u003e\u003c/a\u003e\n\n- [Video Preview](#video-preview)\n- [Parts List](#parts-list)\n- [Raspberry Pi 2 W Information](#raspberry-pi-two-w-info)\n- [Raspberry Pi 2 W OS Setup](#pi-os-setup)\n- [MicroSD Card Setup \u0026 PC Connection (SSH)](#sd-card-setup-and-pc-connection)\n- [Increasing Swap Size](#increasing-swap-size)\n- [Updating \u0026 Upgrading](#updating-upgrading)\n- [Screen Module Setup](#screen-module-setup)\n- [Joystick and Buttons Setup](#joystick-and-buttons-setup)\n- [Battery Module Setup](#battery-module-setup)\n- [Licensing](#licensing)\n- [Useful Commands](#useful-commands)\n- [Wrapping Up](#wrapping-up)\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Video Preview \u003ca name=\"video-preview\"\u003e\u003c/a\u003e\n\n![Demo Video](.github/images/demo.gif)\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Parts List \u003ca name=\"parts-list\"\u003e\u003c/a\u003e\n\n| Part                                                        | Price (USD) |\n| :---------------------------------------------------------- | :---------- |\n| [Raspberry Pi Zero 2 W][url-pi-zero]                        | $15.00      |\n| [240x240, 1.3inch IPS LCD display HAT][url-pi-lcd-hat]      | $14.95      |\n| [Uninterruptible Power Supply UPS HAT][url-pi-power-supply] | $27.95      |\n| 3D Printed Case (coming soon!)                              | ...         |\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Raspberry Pi Zero 2 W Information \u003ca name=\"raspberry-pi-two-w-info\"\u003e\u003c/a\u003e\n\n\"Building on the success of the current Zero family, Raspberry Pi Zero 2 W is built around a Raspberry Pi-designed System-in-Package, which integrates the BCM2710A1 die used in Raspberry Pi 3 with 512MB of RAM.\"\n\nFeatures:\n- 1GHz quad-core, 64-bit ARM Cortex-A53 CPU\n- VideoCore IV GPU\n- 512MB LPDDR2 DRAM\n- 802.11b/g/n wireless LAN\n- Bluetooth 4.2 / Bluetooth Low Energy (BLE)\n- MicroSD card slot\n- Mini HDMI and USB 2.0 OTG ports\n- Micro USB power\n- HAT-compatible 40-pin header\n- Composite video and reset pins via solder test points\n- CSI camera connector\n\nPurchase: \n\n- [https://www.pishop.us/product/raspberry-pi-zero-2-w/][url-pi-zero]\n\nDocuments: \n\n- https://www.raspberrypi.com/documentation/computers/getting-started.html\n\n- https://datasheets.raspberrypi.com/rpizero2/raspberry-pi-zero-2-w-product-brief.pdf\n\n\u003cdetails\u003e\n  \u003csummary\u003eInfographics (click to expand)\u003c/summary\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg width=\"500\" src=\".github/images/pi3g/pi3g-top.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg width=\"500\" src=\".github/images/pi3g/pi3g-bottom.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003e ![Info][img-info] Images courtesy of [pi3g][url-pi3g]\n\u003c/details\u003e\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Raspberry Pi Zero 2 W OS Setup \u003ca name=\"pi-os-setup\"\u003e\u003c/a\u003e\n\n1. Download the Raspberry Pi Imager: https://www.raspberrypi.com/software/\n\n2. Plug the microSD card into the computer and open the Raspberry Pi Imager.\n\n3. We'll install the full [Raspberry Pi Legacy OS (Bullseye, not ~~Bookworm~~, 32-bit)][url-pi-os] in this example so we can take advantage of our massive 1.3inch IPS LCD display HAT:\n\n  \u003e ![Info][img-info] Before installation enable SSH, take note of the hostname, set the username and password for the Raspberry Pi Zero, and set up your connection to the Wi-Fi network.\n\n\u003cdetails\u003e\n  \u003csummary\u003eInstallation Images (click to expand)\u003c/summary\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager.png\" /\u003e\n    \u003cbr/\u003e\n    Select \"Raspberry Pi Zero 2 W\" from the list of devices.\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-device.png\" /\u003e\n    \u003cbr/\u003e\n    Select \"Raspberry Pi OS (Legacy, 32-bit)\" from the list of operating systems.\n    \u003cbr/\u003e\n    Or the \"Use custom\" if you download the OS image from the Raspberry Pi website directly from above.\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-os.png\" /\u003e\n    \u003cbr/\u003e\n    Choose your storage device.\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-storage.png\" /\u003e\n    \u003cbr/\u003e\n    Click \"Next\" to start the installation process.\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-ready.png\" /\u003e\n    \u003cbr/\u003e\n    When the installer asks if you want to customize the installation, click \"Yes\". Enter your custom hostname, username, and password if you'd like, you'll use these later so take note of them.\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-customization-1.png\" /\u003e\n    \u003cbr/\u003e\n    The second customization screen allows you to set up SSH. Enable SSH and press \"Save\".\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-customization-2.png\" /\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-installing.png\" /\u003e\n    \u003cbr/\u003e\n    The installation is completed, but keep your microSD card in the computer for the next few steps.\n    \u003cbr/\u003e\n    \u003cimg width=\"500\" src=\".github/images/screenshots/raspberry-pi-imager-install-complete.png\" /\u003e\n  \u003c/p\u003e\n\u003c/details\u003e\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## MicroSD Card Setup \u0026 PC Connection (SSH) \u003ca name=\"sd-card-setup-and-pc-connection\"\u003e\u003c/a\u003e\n\nCopy the files from the `bootfs` folder at the root of this repository onto the newly created microSD card `bootfs` partition. This will enable SSH, Ethernet over USB, and configure the display settings for the 1.3inch IPS LCD display HAT. Be sure to overwrite any existing files on the microSD card. If you would like to do this manually, follow the steps below:\n\n1. With the microSD card still in your computer, open the `config.txt` file and modify to match the following settings:\n\n  ```bash\n  [all]\n  hdmi_force_hotplug=1\n  hdmi_cvt=300 300 60 1 0 0 0\n  hdmi_group=2\n  hdmi_mode=87\n  display_rotate=0\n  gpio=6,19,5,26,13,21,20,16=pu\n  ```\n\n  \u003e ![Info][img-info] Comment out or remove everything prefixed with a `dtoverlay=` and `dtparam=`.\n\n2. Save and close `config.txt`. \n\n3. In the same directory, open the file `cmdline.txt` and add `modules-load=dwc2,g_ether` after `rootwait`. Ensure it remains a single line of text, and has proper spacing. For example:\n\n  ```bash\n  ... rootwait modules-load=dwc2,g_ether ...\n  ```\n\n  \u003e ![Info][img-info] This is part of enabling SSH and Ethernet over USB.\n\n4. Save and close `cmdline.txt`. \n\n5. Create a new file named `ssh` in the root of the microSD card. This is part of enabling SSH on the Raspberry Pi Zero.\n\n6. Remove the microSD card from the computer and insert it into the Raspberry Pi Zero.\n\n7. Plug the Raspberry Pi Zero into the computer using a USB cable. Connect the cable to the USB port in the center of the Raspberry Pi Zero labeled `USB`. The green LED will light up, indicating the Raspberry Pi Zero is powered on. \n\n8. You should now be able to connect to your Pi using SSH in a CLI:\n\n  ```bash\n  # Replace \"code@pocketpi.local\" with your own `hostname` and `username`.\n  ssh code@pocketpi.local\n  ```\n\n  \u003e ![Info][img-info] It may take a minute for the Pi Zero to connect. If you are prompted to accept the host key, type `yes` and press `Enter`. You will then be prompted for the password you set during the installation.\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Increasing Swap Size \u003ca name=\"increasing-swap-size\"\u003e\u003c/a\u003e\n\nIncreasing the swap size can help speed up the installation process and various other things. This is especially useful when installing software that requires a lot of memory, such as the Raspberry Pi OS update and upgrade process. The default swap size is 100MiB, which is not enough for some installations. Below we will change this to 2GiB (2048MiB). To do this, follow these steps:\n\n  \u003e ![Info][img-info] You can revert this at a later point if you wish or keep it. See \"Reverting back to 100MiB\" below.\n\n  ```bash\n  # Check current swap size (you should see 100MiB or 99MiB for \"Swap total\")\n  free -h\n  # Disable current swap\n  sudo dphys-swapfile swapoff\n  # Set the swap file size to 2048MiB, or 2GiB\n  sudo sed -i 's/^CONF_SWAPSIZE=.*/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile\n  # Recreate the swap file with the new size\n  sudo dphys-swapfile setup\n  # Enable the new swap size\n  sudo dphys-swapfile swapon\n  # Reboot\n  sudo reboot\n  # Reconnect to the Raspberry Pi Zero\n  ssh code@pocketpi.local\n  # Verify the new swap size (should be 2048MiB, or 2GiB)\n  free -h\n  ```\n\n\u003cdetails\u003e\n  \u003csummary\u003eReverting back to 100MiB (click to expand)\u003c/summary\u003e\n\n  ```bash\n  # Disable current swap\n  sudo dphys-swapfile swapoff\n  # Set the swap file size back to 100MiB\n  sudo sed -i 's/^CONF_SWAPSIZE=.*/CONF_SWAPSIZE=100/' /etc/dphys-swapfile\n  # Recreate the swap file with the original size\n  sudo dphys-swapfile setup\n  # Enable the original swap size\n  sudo dphys-swapfile swapon\n  # Reboot\n  sudo reboot\n  # Reconnect to the Raspberry Pi Zero\n  ssh code@pocketpi.local\n  # Verify the reverted swap size (you should be 100MiB or 99MiB)\n  free -h\n  ```\n\u003c/details\u003e\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Updating \u0026 Upgrading \u003ca name=\"updating-upgrading\"\u003e\u003c/a\u003e\n\nIn this section we will update and upgrade the Raspberry Pi Zero to ensure we have the latest software and security updates.\n\n1. Open the terminal and run the following command to access the Raspberry Pi Zero. Using the hostname and the username and password you set during the installation:\n\n  ```bash\n  ssh code@pocketpi.local\n  ```\n\n2. Update \u0026 upgrade the system (the y flag will automatically answer yes to any prompts)\n\n  ```bash\n  sudo apt-get update \u0026\u0026 sudo apt-get full-upgrade -y\n  ```\n\n3. Reboot the Raspberry Pi Zero\n\n  ```bash\n  sudo reboot\n  ```\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Screen Module Setup \u003ca name=\"screen-module-setup\"\u003e\u003c/a\u003e\n\n**240x240, 1.3inch IPS LCD display HAT**\n\nPurchase: \n\n- [https://www.pishop.us/product/240x240-1-3inch-ips-lcd-display-hat-for-raspberry-pi/][url-pi-lcd-hat]\n\nDocumentation: \n\n- https://www.waveshare.com/wiki/1.3inch_LCD_HAT\n\n### Pi OS Configuration\n\nConnect to the Raspberry Pi Zero via SSH:\n\n  ```bash\n  ssh code@pocketpi.local\n  ```\n\nRun the following commands to enable the SPI interface. It should already be enabled if you followed the SD card setup, but it's good to make sure.\n\n  ```bash\n  sudo raspi-config\n  Choose Interface Options -\u003e SPI -\u003e Yes\n  ```\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfig setup Images (click to expand)\u003c/summary\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-interface-options.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-spi.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-spi-confirm.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-spi-done.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-finish.png\" /\u003e\n  \u003c/p\u003e\n\u003c/details\u003e\n\nEnsure your user has the necessary permissions to access the SPI device:\n\n  ```bash\n  sudo usermod -aG spi,gpio $(whoami)\n  ```\n\nInstall fbcp driver for the screen:\n\n  ```bash\n  cd ~\n  sudo apt-get install cmake -y\n  git clone https://github.com/juj/fbcp-ili9341.git\n  cd fbcp-ili9341\n  mkdir build\n  cd build\n  cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DWAVESHARE_ST7789VW_HAT=ON -DBACKLIGHT_CONTROL=ON ..\n  make -j\n  ```\n\nReboot Raspberry Pi：\n  \n  ```bash\n  sudo reboot\n  # Reconnect to the Raspberry Pi Zero\n  ssh code@pocketpi.local\n  ```\n\nTo auto-start when powered on, open the `/etc/rc.local` file for edit:\n\n  ```bash\n  sudo nano /etc/rc.local\n  ```\n\nAnd add the following line just above and before `exit 0`:\n\n  ```bash\n  sudo /home/code/fbcp-ili9341/build/fbcp-ili9341 \u0026\n  ```\n\n\u003e ![Info][img-info] Replace `code` in the last example with your `username`.\n\nAfter you're done making edits press `CTRL + O`, then `ENTER`, and then `CTRL + X` to exit. Reboot the Raspberry Pi Zero:\n\n  ```bash\n  sudo reboot\n  # Reconnect to the Raspberry Pi Zero\n  ssh code@pocketpi.local\n  ```\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Joystick and Buttons Setup \u003ca name=\"joystick-and-buttons-setup\"\u003e\u003c/a\u003e\n\nInstall the necessary software to use the joystick and buttons:\n\n  ```bash\n  sudo apt-get install python3-xlib\n  sudo pip3 install PyMouse\n  sudo pip3 install unix\n  sudo pip3 install PyUserInput\n  wget http://www.waveshare.net/w/upload/d/d3/Mouse.7z\n  7z x Mouse.7z\n  sudo python3 mouse.py\n  ```\n\nSet the auto-start when power on:\n\n  ```bash\n  cd ~/.config/\n  mkdir autostart\n  cd autostart/\n  sudo nano local.desktop\n  ```\n\nAdd the following lines at the end of the `local.desktop` file:\n\n  ```bash\n  [Desktop Entry]\n  Type=Application\n  Exec=python3 /home/code/mouse.py\n  ```\n\n  \u003e ![Info][img-info] Replace `code` in the last example with your `username`.\n\nPress `CTRL + O`, then `ENTER`, and then `CTRL + X` to exit. Reboot the Raspberry Pi Zero:\n\n  ```bash\n  sudo reboot\n  ```\n\nYou should now be able to use the joystick and buttons to move the mouse cursor and click on the screen.\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Battery Module Setup \u003ca name=\"battery-module-setup\"\u003e\u003c/a\u003e\n\n**Uninterruptible Power Supply UPS HAT**\n\nPurchase: \n\n- [https://www.pishop.us/product/uninterruptible-power-supply-ups-hat-for-raspberry-pi-zero-stable-5v-power-output/][url-pi-power-supply]\n\nDocumentation: \n\n- https://www.waveshare.com/wiki/UPS_HAT_(C)\n\n### Pi OS Configuration\n\nRun the following commands to enable the I2C interface. It should already be enabled if you followed the SD card setup, but it's good to make sure.\n\n  ```bash\n  sudo raspi-config \n  Choose Interfacing Options -\u003e I2C -\u003e Yes\n  ```\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfig setup Images (click to expand)\u003c/summary\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-interface-options.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-i2c.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-i2c-confirm.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-i2c-done.png\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/images/screenshots/config-finish.png\" /\u003e\n  \u003c/p\u003e\n\u003c/details\u003e\n\nThen reboot the Pi Zero:\n\n  ```bash\n  sudo reboot\n  # Reconnect to the Raspberry Pi Zero\n  ssh code@pocketpi.local\n  ```\n\n### Software Installation\n\n  ```bash\n  # Download the UPS HAT software archive from the Waveshare website\n  wget https://files.waveshare.com/upload/4/40/UPS_HAT_C.7z\n\n  # Extract the downloaded 7z archive to the current directory\n  7zr x UPS_HAT_C.7z -r -o./\n  ```\n\n### Run the UPS HAT software\n\n  ```bash\n  # Change directory to the newly created directory containing the extracted files\n  cd UPS_HAT_C\n\n  # Run the Python script named 'INA219.py', which typically handles the monitoring of the UPS\n  python3 INA219.py\n  ```\n\n  \u003e ![Info][img-info] If the current value is negative, it means that the batteries are feeding the Raspberry Pi. If the current value is positive, it means that the batteries are charging.\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Licensing \u003ca name=\"licensing\"\u003e\u003c/a\u003e\n\nThis project is licensed under the Apache License, Version 2.0. See the [APACHE_2_LICENSE](LICENSE) file for the pertaining license text.\n\n`SPDX-License-Identifier: Apache-2.0`\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Useful Commands \u003ca name=\"useful-commands\"\u003e\u003c/a\u003e\n\nEdit the `config.txt` file:\n\n  ```bash\n  sudo nano /boot/config.txt\n  ```\n\n\u003cp align=\"right\"\u003e[ \u003ca href=\"#index\"\u003eIndex\u003c/a\u003e ]\u003c/p\u003e\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n## Wrapping Up \u003ca name=\"wrapping-up\"\u003e\u003c/a\u003e\n\nThanks to all the people and projects that made this possible! I hope you enjoy this project as much as I enjoyed working on it. If you have any questions, please let me know by opening an issue [here][url-new-issue].\n\n| Type                                                                      | Info                                                           |\n| :------------------------------------------------------------------------ | :------------------------------------------------------------- |\n| \u003cimg width=\"48\" src=\".github/images/ng-icons/email.svg\" /\u003e                | webmaster@codytolene.com                                       |\n| \u003cimg width=\"48\" src=\".github/images/simple-icons/github.svg\" /\u003e           | https://github.com/sponsors/CodyTolene                         |\n| \u003cimg width=\"48\" src=\".github/images/simple-icons/buymeacoffee.svg\" /\u003e     | https://www.buymeacoffee.com/codytolene                        |\n| \u003cimg width=\"48\" src=\".github/images/simple-icons/bitcoin-btc-logo.svg\" /\u003e | bc1qfx3lvspkj0q077u3gnrnxqkqwyvcku2nml86wmudy7yf2u8edmqq0a5vnt |\n\nFin. Happy programming friend!\n\nCody Tolene\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\n\u003c!-- IMAGE REFERENCES --\u003e\n\n[img-info]: .github/images/ng-icons/info.svg\n[img-warning]: .github/images/ng-icons/warn.svg\n\n\u003c!-- LINK REFERENCES --\u003e\n\n[url-new-issue]: https://github.com/CodyTolene/Pocket-Pi/issues/new\n[url-pi-lcd-hat]: https://www.pishop.us/product/240x240-1-3inch-ips-lcd-display-hat-for-raspberry-pi/\n[url-pi-os]: https://downloads.raspberrypi.com/raspios_oldstable_armhf/images/raspios_oldstable_armhf-2024-03-12/2024-03-12-raspios-bullseye-armhf.img.xz\n[url-pi-power-supply]: https://www.pishop.us/product/uninterruptible-power-supply-ups-hat-for-raspberry-pi-zero-stable-5v-power-output/\n[url-pi-zero]: https://www.pishop.us/product/raspberry-pi-zero-2-w/\n[url-pi3g]: https://www.pi3g.com\n\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n\u003c!----------------------------------------------------------------------------\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodytolene%2Fpocket-pi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodytolene%2Fpocket-pi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodytolene%2Fpocket-pi/lists"}