Getting started with Raspberry Pi: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Lvosandi (talk | contribs)
No edit summary
Lvosandi (talk | contribs)
No edit summary
Line 39: Line 39:
Then you can use built-in HyperTerminal, [http://www.putty.org/ PuTTY] or [http://www.9bis.net/kitty/ KiTTY] for connecting to the virtual serial port.
Then you can use built-in HyperTerminal, [http://www.putty.org/ PuTTY] or [http://www.9bis.net/kitty/ KiTTY] for connecting to the virtual serial port.


The default user is <code>pi</code> with the password <code>raspberry</code>. Make sure you change the default password. For more information about user management see [https://www.raspberrypi.org/documentation/linux/usage/users.md Raspberry Pi documentation].
The default user is <code>pi</code> with the password <code>raspberry</code>. Make sure you change the default password. For more information about user management see [https://www.raspberrypi.org/documentation/linux/usage/users.md Raspbian documentation].
 




Line 82: Line 81:
* Set up [https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=11124 PulseAudio network sink] and use Raspberry Pi as wireless speakers.
* Set up [https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=11124 PulseAudio network sink] and use Raspberry Pi as wireless speakers.
* Set up [http://www.instructables.com/id/Raspberry-Pi-as-low-cost-HD-surveillance-camera/step7/Installing-the-motion-detection-software/ motion] and use Raspberry Pi with USB webcam as a IP camera.
* Set up [http://www.instructables.com/id/Raspberry-Pi-as-low-cost-HD-surveillance-camera/step7/Installing-the-motion-detection-software/ motion] and use Raspberry Pi with USB webcam as a IP camera.
* Set up [http://lauri.vosandi.com/lan/hostapd.html hostapd] and [http://lauri.vosandi.com/lan/dnsmasq.html dnsmasq] and turn your Raspberry Pi into a wireless hotspot.
* Set up [http://lauri.vosandi.com/lan/hostapd.html hostapd] and [http://lauri.vosandi.com/lan/dnsmasq.html dnsmasq] and turn your Raspberry Pi into a wireless hotspot. Easier approach [https://github.com/oblique/create_ap here].
* Set up [https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md nginx] and create static web page using [http://jekyllrb.com/ Jekyll].
* Set up [https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md nginx] and create static web page using [http://jekyllrb.com/ Jekyll].
* [https://github.com/fenlogic/vga666 Add VGA port to your Raspberry Pi].
* Turn your Raspberry Pi into [http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter FM transmitter].

Revision as of 11:46, 6 September 2015

Raspberry Pi is a credit-card sized single-board computer which can be used for variety of purposes. The official operating system for Raspberry Pi is Raspbian. Rasbian and Ubuntu both are derived from Debian, providing seamless access to thousands of software package ready to go via Advanced Packaging Tool. Compared to other similar single-board computers Raspberry Pi has vibrant community and plenty of code examples that you can run out of the box. Before you continue make sure you're comfortable with basic command-line usage, if that's not the case take a look at CodeAcademy track for learning command line.


Preparing SD card

Before you continue make sure you have backed up any important data on the SD-card

Download and uncompress Raspbian:

wget https://downloads.raspberrypi.org/raspbian/images/raspbian-2015-05-07/2015-05-05-raspbian-wheezy.zip
unzip 2015-05-05-raspbian-wheezy.zip

For Linux there is no need to fetch extra tools to write the image to a SD card, simply use dd:

 sudo dd bs=4M if=2015-05-05-raspbian-wheezy.img of=/dev/mmcblk0

If you're running on Windows, you can use Win32 Disk Imager to write the image to the SD card.


Powering up

Use USB-UART bridge to power up Raspberry Pi and gain access to the command-line.


Accessing command-line

For Linux there are variety of programs for connecting to serial port:

screen /dev/ttyUSB0 115200
picocom /dev/ttyUSB0 -b 115200
minicom -b 115200 -o -D /dev/ttyUSB0

For Windows you need to install driver for your USB-UART bridge first. Then you can use built-in HyperTerminal, PuTTY or KiTTY for connecting to the virtual serial port.

The default user is pi with the password raspberry. Make sure you change the default password. For more information about user management see Raspbian documentation.


Setting up network

Raspbian as Debian attempts to request IP address using DHCP on the Ethernet port. This assumes a functioning DHCP server on the network, which is the case most of the time. If you want to connect your laptop directly to the Raspberry Pi you can set up manual IP addresses. The networking configuration is stored in /etc/network/interfaces, remember to issue service networking restart after you've tweaked the configuration.


Remote shell

For more convenient access to command-line SSH is recommended. You can start by installing OpenSSH server on Raspberry Pi:

apt-get install openssh-server

Assuming Raspberry Pi sits on an DHCP enabled network you can use following on your Linux laptop to connect to remote shell:

ssh pi

Otherwise determine the IP address of your Raspberry Pi, for example with ip addr list:

ssh 192.168.x.x

Make your life easier by setting up public key authentication. Note that while you are connected via USB-UART bridge you can add your public to Raspberry Pi as follows:

mkdir -p /root/.ssh
cat - >> /root/.ssh/authorized_keys
# Paste now
# Press Ctrl-D


Beyond installation

Once you are comfortable with Raspberry Pi command line and SSH you can do a lot of cool stuff: