Pi Maker
Workshop
Powered by:
2.Accessing the Pi
http://www.inventrom.com/http://www.robotechlabs.com/
Mayank Joneja
botma...
Mayank Joneja
Operating Systems
 Many OSs (linux variants)
 Most common one is Raspbian “wheezy”
 Raspbian is a free op...
Mayank Joneja
Popular Variants for the Raspberry Pi
http://www.makeuseof.com/tag/7-operating-
systems-you-can-run-with-ras...
Mayank Joneja
OS Structure
 Hardware does the actual computing
 To interact with hardware the instructions need to
be tr...
Mayank Joneja
 The application layer is available to us in the form of the Graphical User Interface
(GUI)
 Sits on the t...
Mayank Joneja
NOOBS-New Out of the Box Setup
 NOOBS is a way to make setting up the RasPi for the first time much easier
...
Mayank Joneja
SSH
 Secure Shell (SSH) is a network protocol used for
 Secure data communication
 Remote command-line lo...
Mayank Joneja
PuTTY
 One of the most popular SSH clients, also the one that we
use
 Free and open source terminal emulat...
Mayank Joneja
Advanced IP Scanner
 Install an IP Scanner
 Need to know the IP for accessing
the Pi via PuTTY
 Enter the...
Mayank Joneja
Login to the Pi
Username: pi
Password: raspberry
Mayank Joneja
Command Line Interface
 Gives better access over hardware
to do all the awesome things you
want
 Is more p...
Mayank Joneja
Popular UNIX commands
 sudo date or date : Displays the current date and time
 startx : Launches the GUI (...
Mayank Joneja
 cd directory name : change directory eg. cd /boot ( in UNIX, ‘.’ refers to current
dir, ‘..’ refers to pre...
Mayank Joneja
Yeh Sudo Sudo kya hai?
 sudo is an abbreviation of “super user do” and is a Linux command
that allows progr...
Mayank Joneja
Easter Eggs!
 An Easter egg is an intentional inside joke, hidden message,
or feature in a work such as a c...
Mayank Joneja
4. sudo apt-get install emacs
emacs
[Esc]+[x]
doctor
tetris
life
5. sudo apt-get install cowsay
cowsay –f st...
Mayank Joneja
File access through Samba
 Back in the 1990s, Microsoft developed a protocol that allows one Windows machin...
Mayank Joneja
File access through Samba
 sudo apt-get install samba samba-common-bin
 sudo nano /etc/samba/smb.conf
 Fi...
Mayank Joneja
 You can now connect to your Raspberry Pi from a Windows machine. Open the
“Computer” window (on Windows 7 ...
Mayank Joneja
 Once connected, you can access
the files on the Pi like any other
directory on your harddisk
http://www.ma...
Mayank Joneja
Virtual Network Computing (VNC)
 In computing, Virtual Network Computing (VNC) is a graphical
desktop shari...
Mayank Joneja
TightVNC
 Tight VNC is a free remote control
software package
 sudo apt-get install tightvncserver
 tight...
Mayank Joneja
Accessing the VNC Server
 On Windows:
 Run VNC Viewer
 Enter IP Address:session eg. 192.168.1.4:1
 Over ...
Mayank Joneja
OMXPlayer
 OMXPlayer is a commandline OMX player to play videos and audio for the
Raspberry PI.
It was deve...
Mayank Joneja
OMXPlayer Commands
Mayank Joneja
Troubleshoot: No sound over HDMI
 cd /boot
 sudo nano config.txt
 hdmi_drive=2 should be uncommented for ...
Mayank Joneja
RasPi Dynamic Bike Headlight
https://www.youtube.com/watch?v=Nfk1-XMASrk
Mayank Joneja
Linux Commands List
Mayank Joneja
Mayank Joneja
Mayank Joneja
Upcoming SlideShare
Loading in …5
×

2.Accessing the Pi

626 views

Published on

This is a part of the slide set used at the MakerSpace Noida (India) launch event, Pi Maker Workshop. This slide set is designed to help people get started with the Raspberry Pi and also serves as a collection of innovative projects and some core basic concepts that can aid anybody with their first few steps into the world of DIY electronics or maybe serve as a refresher for the experienced.

Feel free to refer and share but please don't alter the watermarks :)

Published in: Engineering
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
626
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

2.Accessing the Pi

  1. 1. Pi Maker Workshop Powered by: 2.Accessing the Pi http://www.inventrom.com/http://www.robotechlabs.com/ Mayank Joneja botmayank.wordpress.com botmayank@gmail.com
  2. 2. Mayank Joneja Operating Systems  Many OSs (linux variants)  Most common one is Raspbian “wheezy”  Raspbian is a free operating system based on Debian and optimized for the Raspberry Pi hardware  Other possible OS include: Arch Linux, ARCOs, RiscOS, Bodhi Linux ports etc  Media Center operating Systems based on XBMC include Raspbmc, OpenELEC as well  Android is supported for the Raspberry Pi, however given the limited hardware specs, it works really slowly.  Source code: https://github.com/Razdroid/userland  Wiki: https://razdroid.net/  No Windows support (:P)
  3. 3. Mayank Joneja Popular Variants for the Raspberry Pi http://www.makeuseof.com/tag/7-operating- systems-you-can-run-with-raspberry-pi/
  4. 4. Mayank Joneja OS Structure  Hardware does the actual computing  To interact with hardware the instructions need to be translated to 1’s and 0’s (Punch cards in the good ol’ days anyone? )  The Kernel converts the High level instructions to Low level ones i.e assembly level language (eg. MV AX, BX)  Shell is used to command the kernel to do a particular task
  5. 5. Mayank Joneja  The application layer is available to us in the form of the Graphical User Interface (GUI)  Sits on the top of the chain  Converts graphical inputs into shell commands  Many times the least important for developers  There is always a shell command for every GUI action but the converse is not true. Eg. Ifconfig, ping
  6. 6. Mayank Joneja NOOBS-New Out of the Box Setup  NOOBS is a way to make setting up the RasPi for the first time much easier  You won’t need network access and you won’t need to download any special imaging software  Just head to the http://www,raspberrypi.org/downloads page, grab a copy of the NOOBS zip file, and unpack it onto a freshly formatted SD Card  When you boot up for the first time, you’ll see a menu prompting you to install one of the several operating systems into the free space on the card  The choice means you can boot the Pi with a regular operating system like Raspbian or with a media centre specific OS like RaspBMC https://www.youtube.com/watch?v=TyFDaMpdh2c&list =TLiwsXqzVYEWQk6pVkT9xd8eN0tq10H7ps Geek Gurl Diaries on YouTube
  7. 7. Mayank Joneja SSH  Secure Shell (SSH) is a network protocol used for  Secure data communication  Remote command-line login  Remote command execution  It is done via a secure channel over an insecure network  Needs a server and a client (running SSH server and SSH client programs respectively)
  8. 8. Mayank Joneja PuTTY  One of the most popular SSH clients, also the one that we use  Free and open source terminal emulator  Serial console and network file transfer application  It supports several network protocols, including SCP, SSH, Telnet and rlogin  Link to download PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/downl oad.html  Sessions
  9. 9. Mayank Joneja Advanced IP Scanner  Install an IP Scanner  Need to know the IP for accessing the Pi via PuTTY  Enter the correct IP address of the Pi assigned to your team in PuTTY
  10. 10. Mayank Joneja Login to the Pi Username: pi Password: raspberry
  11. 11. Mayank Joneja Command Line Interface  Gives better access over hardware to do all the awesome things you want  Is more prominently used in Linux through Terminal, however Command Line Access is available in almost all devices through some form of a console, even smart TVs  On windows machines, one can access it by going to Start->Run->cmd
  12. 12. Mayank Joneja Popular UNIX commands  sudo date or date : Displays the current date and time  startx : Launches the GUI (X server)  [ctrl+c] : breaks the script  hostname –l : Displays your IP address  free : Shows how much memory space is available  ls : Shows list of files in that directory (or folder in Windows)  cat filename : Shows content of file “filename”  rm filename : Remove or delete the file (Please don’t try this right now :D)  sudo mkdir directoryname : Create a new directory
  13. 13. Mayank Joneja  cd directory name : change directory eg. cd /boot ( in UNIX, ‘.’ refers to current dir, ‘..’ refers to prev dir, therefore, to go one level up, “cd ..”  cd : parent directory  nano filename : Opens file in “nano”, a Linux command line editor that opens up inside the PuTTY window or the Terminal itself  * : wildcard, eg. ls d*  sudo apt-get update : Downloads the package lists from the repositories and “updates” them to get information on the newest version of packages and their dependencies.  sudo apt-get upgrade : Downloads the actual new versions of the packages based on the lists fetched by the previous command.
  14. 14. Mayank Joneja Yeh Sudo Sudo kya hai?  sudo is an abbreviation of “super user do” and is a Linux command that allows programs to be executed as a super user (aka root user) or another user. It's basically the Linux/Mac equivalent of the runas command in Windows.  It allows you to make changes that affect the complete system and not just one user  Some programs or commands require root access, or do not work until they are preceded by “sudo”  It’s the equivalent of Run as Administrator on Windows
  15. 15. Mayank Joneja Easter Eggs!  An Easter egg is an intentional inside joke, hidden message, or feature in a work such as a computer program  Here are a few that are really fun as featured in a post by Inventrom http://inventrom.wordpress.com/2014/07/11/easter-eggs-in- raspberry-pi/ 1. sudo apt-get moo 2. sudo apt-get install sl sl 3. sudo apt-get install vim vim :help 42
  16. 16. Mayank Joneja 4. sudo apt-get install emacs emacs [Esc]+[x] doctor tetris life 5. sudo apt-get install cowsay cowsay –f stegosaurus “Mooah” 6. sudo apt-get install fortune fortune | cowsay fortune | cowsay –f tux 7. sudo apt-get install telnet
  17. 17. Mayank Joneja File access through Samba  Back in the 1990s, Microsoft developed a protocol that allows one Windows machine to access the files and folders on another Windows machine.  The protocol, which is known as the Common Internet File System (CIFS) – but was originally called Server Message Block (SMB), has been implemented on other operating systems including Linux.  The most popular implementation is known as Samba and it allows devices like the Raspberry Pi to act as a CIFS file server. To put it another way, it allows a Windows PC to mount a folder on a Raspberry Pi and then copy, delete, read and write files on the it.
  18. 18. Mayank Joneja File access through Samba  sudo apt-get install samba samba-common-bin  sudo nano /etc/samba/smb.conf  Find the line “# security = user” and UNCOMMENT it (remove the hash)  Scroll down to the [Homes] section and change read only = yes to read only = no  [Ctrl+X] to leave the nano editor and then [Y] to confirm that the file should be saved, then press [Enter]  sudo service samba restart  sudo service samba reload  sudo smbpasswd –a pi
  19. 19. Mayank Joneja  You can now connect to your Raspberry Pi from a Windows machine. Open the “Computer” window (on Windows 7 ) or “This PC” (on Windows 8) and click the “Map Network Drive” button on the toolbar (Windows 7) or click the “Map Network Drive” button under “Computer” (on Windows 8 ).  In the Map Network Drive dialog, select and unused drive letter from the “Drive:” drop- down list and enter raspberrypipi in the “Folder:” field. Check “Connect using different credentials” and click “Finish”.  Enter pi in the Username field when you are asked to enter the network credentials. Enter the password you set previously in the password field and click OK.
  20. 20. Mayank Joneja  Once connected, you can access the files on the Pi like any other directory on your harddisk http://www.maketecheasier.com/ turn-raspberry-pi-into-file-server/
  21. 21. Mayank Joneja Virtual Network Computing (VNC)  In computing, Virtual Network Computing (VNC) is a graphical desktop sharing system  Uses the Remote Frame Buffer protocol (RFB) to remotely control another computer  Transmits the keyboard and mouse events from one computer to another relaying the graphical screen updates back in the other direction over a network
  22. 22. Mayank Joneja TightVNC  Tight VNC is a free remote control software package  sudo apt-get install tightvncserver  tightvncserver (configure password)  vncserver :1 –geometry 1024x768 – depth 24 (Starts a session on VNC display zero (:1) with full HD resolution
  23. 23. Mayank Joneja Accessing the VNC Server  On Windows:  Run VNC Viewer  Enter IP Address:session eg. 192.168.1.4:1  Over Android  Download Juice SSH ( similar to PuTTY) for command line access  Download VNC Viewer (by RealVNC Limited) or some similar app  Over iOS  Download VNC Client app  For Chrome  VNC Viewer for Google Chrome extension by RealVNC
  24. 24. Mayank Joneja OMXPlayer  OMXPlayer is a commandline OMX player to play videos and audio for the Raspberry PI. It was developed as a testbed for the XBMC Raspberry PI implementation and is quite handy to use standalone.  http://omxplayer.sconde.net/  sudo apt-get update  sudo apt-get -y install omxplayer  To play a video: omxplayer myvideo.mp4  omxplayer –o hdmi myvideo.mp4 to force the audio over the HDMI interface
  25. 25. Mayank Joneja OMXPlayer Commands
  26. 26. Mayank Joneja Troubleshoot: No sound over HDMI  cd /boot  sudo nano config.txt  hdmi_drive=2 should be uncommented for the sound to run through the HDMI
  27. 27. Mayank Joneja RasPi Dynamic Bike Headlight https://www.youtube.com/watch?v=Nfk1-XMASrk
  28. 28. Mayank Joneja Linux Commands List
  29. 29. Mayank Joneja
  30. 30. Mayank Joneja
  31. 31. Mayank Joneja

×