Raspberry Pi Python
Raspberry Pi is a single board computer(SBC) which have capabilities to work like a general Desktop/Laptop computer can do. Plus it can be use to play with a lot of peripherals like LED, sensors, motors, etc to make DIY projects using on board GPIO Pins. Overall you will have a great experience working with a Pi
Along with monitor keyboar and mouse are also needed.
Power supply also available at amazon
You can also use a standard powerbank to power a Raspberry pi.
To connect Raspberry Pi to a HDMI monitor.
HDMI port on Raspberry Pi board -
HDMI to VGA adapter
To connect Raspberry Pi to a VGA monitor.
- When booting is completed login prompt will appear like this -
Type “pi” and press enter. Default password is “raspberry”. Then type “startx” to load the Graphics User Interface(GUI).
- Now the GUI will load. To start with your new os you can open terminal by clicking on Menu>Accessories>Terminal. This window will appear -
- Type in “sudo raspi-config”. (sudo is a command in linux which gives you superuser privilege which is needed sometimes for run some commands). This window will appear -
Select Expand Filesystem to expand the available free space on SD card. This is basically re-partitioning your SD card. When you write the os image on your SD card a partition is created which can not be used until you re-partition it.
Select Change user password to change the password if you want.
Select Internationalisation options to set time zone, language, keyboard layout(Set keyboard layout to US English).
To connect to a network click on wifi icon on top right side of computer monitor screen.
Type in terminal “hostname -I” to check your network IP address.
To check available RAM go to Menu>Accessories>Task Manager.
Check available space. Type in terminal - “df -h”
To update system packages type in terminal “sudo apt-get update”
Upgrade os “sudo apt-get dist-upgrade”
Update firmware “sudo rpi-update”
Always remember to do updates on regular basis.
Change time zone - “dpkg-reconfigure tzdata”. Or to update date and time manually type - sudo date -s “Fri Feb 10 12:04 IST 2017” (This is for example. IST is Indian Standard Time. USe the time zone of your country in that place).
Shutdown type - “sudo halt”. Reboot - “sudo reboot”
Check os version - “cat /etc/os-release”
If there is an error in executing any command just type sudo before it.
Media player -
Kodi - sudo apt-get install kodi
VLC - sudo apt-get install vlc
OMX player - sudo apt-get install omxplayer
Setting omxplayer as deafult -
sudo apt-get install omxplayer
sudo apt-get install xterm
Right click on any video file > Open with… > Select “custom command line” > write the following command in box for “command line to execute” - xterm -fullscreen -fg black -bg black -e omxplayer -r %f
For any audio file just remove “fullscreen” from above command.
LEARNING PYTHON -
https://robot.bolink.org/ebooks/Head First Python - ora 2011.pdf
UNDERSTANDING GPIO PINS -
Type in terminal - “gpio readall” to show gpio pin configuration
Now basic setup for your Raspberry Pi is done. There are lots of software available in Raspbian pre-installed which you can use like Python, Scratch, Sonic Pi, Sense Hat emulator, Wolfram, Mathematica, few python based games pre-installed. So enjoy working with Pi. Hope this tutorial helps. For any further problem or problem related to this tutorial fell free to ask. Have a great experience.