usmanwardag / demos_pi

Demos for Raspberry Pi tutorial.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting Up Raspberry Pi

Install the Raspberry Pi OS & enable remote access

  • Download Raspberry Pi Imager for your OS here.
  • Connect an SD card reader with the SD card inside.
  • Open Raspberry Pi Imager and choose the required OS (Raspberry Pi OS recommended).

Screen Shot 2022-02-02 at 12 07 10 PM

  • Flash the image onto your SD card.
  • Create an empty file called .ssh and put it in the root SD card folder. This is important to allow ssh access later.

Connect the Pi to a WiFi network

  • Create a file named wpa_supplicant.conf with the desired access points to connect to. Follow the template here.

Screen Shot 2022-02-02 at 12 09 14 PM

  • Place this file in the root folder of the SD card.
  • Whenever Pi boots, it will connect to the first available access point.

Access the Pi remotely through SSH

  • Insert SD card into its slot, and plug in power supply.
  • Determine the IP address of Pi.
Finding IP address
  • Install nmap.
  • Discover host machine’s IP address. Let's say it is 192.168.2.5. This means that the other devices connected to the same access point will have IP address like 192.168.2.1, 192.168.2.2, 192.168.2.3 etc. The notation of this range is 192.168.2.0/24 (covers 192.168.2.0 to 192.168.2.255).
  • Run this nmap command on the host machine: sudo nmap –sn 192.168.2.0/24

Screen Shot 2022-02-02 at 12 16 07 PM

  • Run ssh pi@192.168.182.81 to connect remotely.
  • The default password is raspberry. Run sudo raspi-config to set your own password.

About

Demos for Raspberry Pi tutorial.


Languages

Language:Python 100.0%