Skip to content

Instantly share code, notes, and snippets.

@nagasudhirpulla
Last active August 1, 2020 13:51
Show Gist options
  • Save nagasudhirpulla/f0b586fdfaa88221e10c861150572ee3 to your computer and use it in GitHub Desktop.
Save nagasudhirpulla/f0b586fdfaa88221e10c861150572ee3 to your computer and use it in GitHub Desktop.
Raspberry pi Notes

Setting Raspbery pi zero for wifi

  • setting up tutorial
  • Download Raspbian lite
  • Flash Raspbian lite zip file into SD card using etcher software
  • If SD card is showing wrong capacity or shown as 2 disks, goto device management and delete all partitions of sd card, create new simple volumn of type FAT32. Even then, if etcher could not flash raspbian, try using another laptop.
  • save a file named ssh (no extension) in the sd card
  • write the following in a file named wpa_supplicant.conf and save it in the sd card
country=in
ctrl_interface=/var/run/wpa_supplicant 
update_config=1

 
network={
    ssid="WIFI-NAME"
    psk="WIFI-PASSWORD"
    scan_ssid=1
}
  • use Advanced IP Scanner to find the ip address of raspberry pi.
  • use PuTTY to connect to raspberry pi ssh terminal. Port is 22, connection type is SSH.
  • Putty login and password credentials are pi and raspberry (default password).
  • To transfer files from your pc to raspberry pi use WinSCP software.

Running python flask webserver in raspberry pi

sudo apt-get update
sudo apt-get install -y python3
sudo apt-get install -y python-pip3 python3-dev
sudo pip3 install flask
  • Transfer files from your PC to raspberry pi connected in the same wifi using winscp
  • After transfering the files, you can verify the presence of files in putty using ls command
  • To run the web server, use the standard command like python main.py

GPIO Pins

  • Raspberry Pi zero w layout diagram - Raspberry pi layout
  • GPIO pins should be given voltages not above 3.3 V and currents not more than 0.5mA. If we use a 3.3 V power source, use resistor of atlease 6 KOhms - link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment