- 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.
- Link for code - https://github.com/adafruit/Pi_Internet_Thing_Videos/tree/master/Part_1
- Install python and flask in raspberry pi by typing the following 3 commands in putty after logging into the 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
- Raspberry Pi zero w layout diagram -
- 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