官术网_书友最值得收藏!

Setting up the SD card and installing Raspbian

Installing an operating system is a two-step process. This involves formatting the SD card to the FAT filesystem format, and copying and pasting the image to the card.

File Allocation Table (FAT) is a method used for recording which sectors of a disk files are stored in and which sectors are free to be written to. It has its origins in the 1970s, when Bill Gates and Marc McDonald developed it for use on floppy disks. Due to its robustness and simplicity, it is still found on SD cards today and is the format we will need in order to install Raspbian.

When you purchase an SD card, you might notice that it is already formatted to FAT, as this format is popular with devices such as digital cameras. Many manufacturers ship the card so that it is ready to go out of the box and no further formatting is required. However, we recommend formatting your card if you did not purchase the official SD card.

To format and copy the downloaded Raspbian image to your card, follow the official steps at the Raspberry Pi website, depending on your operating system:

Once the operating system is installed, we can wrap up its configuration by ensuring that the Secure Shell (SSH) for remote connection to the Raspberry Pi is up and running.

Raspberry Pi SSH setup

You have now successfully completed the Raspberry Pi setup and will see the Raspbian Linux desktop. This desktop contains a number of icons that will load the programs installed by default, including Midori, a fast and light web browser, and the Python programming language IDE (integrated development environment), both of which we will be using.

Also of note is the LXTerminal. This icon launches the Linux Terminal window, which allows us to run applications via the command line.

A final task that we can complete before moving on to installing our Arduino software is to check whether SSH is up and running. We will be using SSH to connect to our Raspberry Pi remotely in future projects. Perform the following steps to set up SSH:

  1. Open a Terminal window and type the following command:
    ps aux | grep sshd 
    
  2. You should see the following process running:
    root 2067 0.0 0.2 6208 1060 ? Ss 18:17 0:00 /usr/sbin/sshd
    
  3. If you do not see the SSH process running, enter the following command:
    sudo /etc/init.d/ssh start
    

After this command has run, try running the previous command again and check whether the sshd process is present. We will learn about this in detail in Chapter 4, Temperature Storage – Setting Up a Database to Store Your Results.

Tip

You can use the ps command to show running processes on your Raspberry Pi.

With this task complete, let's move on to installing the software we need to program the Arduino.

主站蜘蛛池模板: 深泽县| 滨州市| 丰宁| 辉南县| 图片| 玉树县| 常州市| 金寨县| 乌恰县| 新巴尔虎左旗| 南溪县| 武鸣县| 广东省| 叙永县| 温泉县| 大余县| 偃师市| 贵德县| 淳安县| 长沙市| 金沙县| 石家庄市| 天等县| 镇原县| 寿阳县| 崇明县| 措勤县| 阳原县| 荆州市| 郴州市| 长岭县| 桃园县| 怀宁县| 讷河市| 辽中县| 丹寨县| 镇远县| 柳州市| 监利县| 如皋市| 天镇县|