Raspberry Pi

The First Step:Raspberry Pi
_____________________________________________________________________________

Download & Install OS to Raspberry Pi Board with out Monitor

1. Go to URL:http://www.raspberrypi.org/ and Click Download Link

2. Select OS for Install ( I select Raspbian OS)

3. Unzip Download File

4. Write image to SD Card by Win32DiskImager program

5. Insert SD Card to Raspberry Pi Board

6. On Raspberry Pi Board and wait

7. Connect to Raspberry Pi with ssh protocol default user:pi & password:respberry

** If you don't Know IP Address for Connect you can use nmap to scan IP Address**

8. when you can conncet to raspberry pi you can use linux command

--------------------------------------------------------------------------------------------------

The Second Step:Raspberry Pi
______________________________________________________________________________

Use USB Wireless

1. In plug USB Wireless

2. Connect to raspberry pi by ssh

3. type command : sudo nano /etc/network/interfaces

4.edit
auto wlan0
allow-hotplug wlan0

iface wlan0 inet dhcp

wpa-ssid "Change SSID NAME"

wpa-psk "Insert wpa password"

5. save and reboot
6. use nmap scan find IP from wireless rang
7. connect to raspberrypi from Wifi IP

------------------------------------------------------------------------

The Third Step:Raspberry Pi
______________________________________________________________________________

Connect Remote Desktop By TightVNC to Raspberrypi

1. ssh to respberrypi

2. Install TightVNCserver by command : sudo apt-get install tightvncserver

3. Test TightVNCserver by command : tightvncserver

4. Create Session config by Command : vncserver :1 -geometry 1600×900 -depth 16 -pixelformat rgb565:

**** For Kill by Command : vncserver –kill :1****

5. Use TightVNCclient to connect by Raspberrypi IP

6. If you can Connect Naxt you type command : sudo chown pi /home/pi/.Xauthority

7. Create Service start by command : sudo nano /etc/init.d/tightvnc and insert

#!/bin/sh

### BEGIN INIT INFO

# Provides: tightvncserver

# Required-Start:

# Required-Stop:

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: start vnc server

# Description:

### END INIT INFO


case “$1″ in

start)

su pi -c ‘vncserver :1 -geometry 1600×900 -depth 16 -pixelformat rgb565:’

echo “VNC Started”

;;

stop)

pkill Xtightvnc

echo “VNC Terminated”

;;

*)

echo “Usage: /etc/init.d/tightvnc {start|stop}”

exit 1

;;

esac


And Save


8. Chang mod : sudo chmod 755 /etc/init.d/tightvnc

9. test service start and stop

sudo /etc/init.d/tightvnc start
sudo /etc/init.d/tightvnc stop

10. type command : sudo update-rc.d tightvnc defaults
11. sudo reboot

---------------------------------------------------------------------------------------------
Python Packaging
  • sudo apt-get install python-dev
  • curl -O http://python-distribute.org/distribute_setup.py
  • python distribute_setup.py
  • curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
  • python get-pip.py
  • sudo pip install virtualenv
--------------------------------------------------------------------------------------------------------------------------Your First RaspberryPi Program: Blinken
____________________________________________________________________________
At a terminal, run the following commands to setup an environment for blinking an LED:
  • mkdir blinken
  • cd blinken
  • virtualenv env
  • . env/bin/activate
  • pip install rpi.gpio
Then run an editor (ex. vi blink.py
----------------------------------------------------------------------------------------------------------------------------

ไม่มีความคิดเห็น:

แสดงความคิดเห็น