I have just received my first RaspberryPi early this week. The one I have is Raspberry Pi with model B+.
A quick starting guide for RaspberryPi can be found at http://www.raspberrypi.org/help/quick-start-guide/.
Luckily for me that I have a chance to attend a free training course conducted by Deaware supported by SIPA. It helps me understand RaspberryPi quickly.
The RaspberryPi with Model B+ has the following specifications:
* 40-pin GPIO header.
* 4 USB ports.
* Micro SD card socket.
The figure below presents the high-level design of the Model B+. (Picture from http://www.raspberrypi.org/product/model-b-plus/)
And, the GPIO diagram is presented below: (Picture from http://www.raspberrypi.org/product/model-b-plus/)
The devices required for my RaspberryPi project are:
1. Raspberry Pi
2. A micro USB cable for supplying power to the RaspberryPi
3. A LAN cable RJ45
4. SD card at least 4GB for OS, libraries and programs to work with the RaspberryPi
The operating system I have installed for my RaspberyPi is Raspbian (Raspbian.org). Its image can be download directly from http://www.raspberrypi.org/downloads/
After the image is loaded, extract the zip file and have our image file with extension .img. We can then write the image of Raspbian OS to the SD card which later will be put into the RaspberryPi SD socket. To burn the image using a computer with Windows OS, follow the instruction here.
1. Insert the SD card into the SD card reader on our computer.
2. Write the image of Raspbian into the SD card using Win32DiskImager, which can be download from http://sourceforge.net/projects/win32diskimager/.
3. Right click on the Win32DiskImager.EXE and select Run as Administrator.
4. On the Win32DiskImager program, browse to the image file from our Step 2 and make sure that the drive to the SD card is correct.
5. Then click Write.
After this point, we have Raspbian OS ready for our RaspberryPi. Since the image written into the SD card is about 2.7GB, it makes the capacity of the SD card to be the same as that size. We later have to expand the size of our SD card to be back to its original capacity. This configuration change must be done at the OS of the RaspberryPi. Therefore, we will not put the SD card into the RaspberryPi board yet. What we are gonna do now is to make our computer be able to communicate with the RaspberryPi.
We are gonna make our computer talk to the Pi via network (LAN cable). To do so, we assign a static IP address to our computer manually and we will assign one to our RaspberryPi, in which these two IP address must be in the same network. For example, our computer has IP: 192.168.10.10 and our Pi has IP: 192.10.10.20.
For Windows, we can simply set IP on our computer by going to Control Panel --> Network and Sharing Center --> Change adapter Settings. Then, right click at an Ethernet connection --> Properties --> Internet Protocol Version 4 --> Properties. After that assign an IP address for our computer to talk with our Pi.
To set an IP address for our Pi device, we make change the file named cmdline.txt in the SD card.
Edit the file cmdline.txt by adding
ip=192.168.10.20
at the end of the line. Make sure that the added IP address is on the same line.
What we are doing next is to eject the SD card from our computer and put the SD card into its slot on the RaspberryPi board at the back side, as shown in the picture below.
Connect our RaspberryPi board with our computer with LAN cable and supply power to the board using the USB cable. Now, we are ready to start our RaspberryPi.
We can test our connection with Pi by pinging to the Pi's IP address.
ping 192.168.10.20
And, we should find our Pi.
Once we found our Pi, we can control the Pi by remotely accessing the Pi's console.
Here, we use mRemoteNG to access the Pi's console. mRemoteNG can be downloaded from http://www.mremoteng.org/download. What we have to do is to create a new connection to the RaspberryPi with our defined IP (192.168.10.20).
The default user name and password for the RaspberryPi is
User: pi
Password: raspberry
Connect and now we can access the Pi's console.
On the console, we use the first command to check the size of the SD card. The second command is to config the RaspberryPi, in which we want to expand the size of the SD card.
df -h
sudo raspi-config
Here is the screen to expand the size of the SD card.
References:
Training material by Deaware.
www.raspberrypi.org
No comments:
Post a Comment