100% found this document useful (1 vote)
27 views

Raspbian OS Programming with the Raspberry Pi: IoT Projects with Wolfram, Mathematica, and Scratch 1st Edition Agus Kurniawan instant download

The document is a promotional overview of the book 'Raspbian OS Programming with the Raspberry Pi: IoT Projects with Wolfram, Mathematica, and Scratch' by Agus Kurniawan, which covers various aspects of programming and IoT projects using Raspberry Pi. It includes links to download the book and other related titles, along with a detailed table of contents outlining the chapters and topics covered. The book is designed for readers interested in learning about Raspbian OS, programming environments, and practical applications in IoT.

Uploaded by

rosiamrenon2s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
27 views

Raspbian OS Programming with the Raspberry Pi: IoT Projects with Wolfram, Mathematica, and Scratch 1st Edition Agus Kurniawan instant download

The document is a promotional overview of the book 'Raspbian OS Programming with the Raspberry Pi: IoT Projects with Wolfram, Mathematica, and Scratch' by Agus Kurniawan, which covers various aspects of programming and IoT projects using Raspberry Pi. It includes links to download the book and other related titles, along with a detailed table of contents outlining the chapters and topics covered. The book is designed for readers interested in learning about Raspbian OS, programming environments, and practical applications in IoT.

Uploaded by

rosiamrenon2s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Raspbian OS Programming with the Raspberry Pi:

IoT Projects with Wolfram, Mathematica, and


Scratch 1st Edition Agus Kurniawan download

https://textbookfull.com/product/raspbian-os-programming-with-
the-raspberry-pi-iot-projects-with-wolfram-mathematica-and-
scratch-1st-edition-agus-kurniawan/

Download more ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Raspbian OS Programming with the Raspberry Pi: Iot


Projects with Wolfram, Mathematica, and Scratch Black.

https://textbookfull.com/product/raspbian-os-programming-with-
the-raspberry-pi-iot-projects-with-wolfram-mathematica-and-
scratch-black/

IoT Projects with NVIDIA Jetson Nano: AI-Enabled


Internet of Things Projects for Beginners Agus
Kurniawan

https://textbookfull.com/product/iot-projects-with-nvidia-jetson-
nano-ai-enabled-internet-of-things-projects-for-beginners-agus-
kurniawan/

Arduino Programming with .NET and Sketch 1st Edition


Agus Kurniawan

https://textbookfull.com/product/arduino-programming-with-net-
and-sketch-1st-edition-agus-kurniawan/

Arduino Programming with .NET and Sketch 1st Edition


Agus Kurniawan

https://textbookfull.com/product/arduino-programming-with-net-
and-sketch-1st-edition-agus-kurniawan-2/
Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-
loucas/

Hands On Start to Wolfram Mathematica And Programming


with the Wolfram Language Cliff Hastings

https://textbookfull.com/product/hands-on-start-to-wolfram-
mathematica-and-programming-with-the-wolfram-language-cliff-
hastings/

Raspberry Pi OS Text Editors, git, and LXC; A Practical


Approach (Raspberry Pi OS System Administration with
systemd) 1st Edition Robert M. Koretsky

https://textbookfull.com/product/raspberry-pi-os-text-editors-
git-and-lxc-a-practical-approach-raspberry-pi-os-system-
administration-with-systemd-1st-edition-robert-m-koretsky/

Practical Internet of Things with JavaScript Build


standalone exciting IoT projects with Raspberry Pi 3
and JavaScript 1st Edition Arvind Ravulavaru

https://textbookfull.com/product/practical-internet-of-things-
with-javascript-build-standalone-exciting-iot-projects-with-
raspberry-pi-3-and-javascript-1st-edition-arvind-ravulavaru/

Beginning Arduino Nano 33 IoT: Step-By-Step Internet of


Things Projects 1st Edition Agus Kurniawan

https://textbookfull.com/product/beginning-arduino-nano-33-iot-
step-by-step-internet-of-things-projects-1st-edition-agus-
kurniawan/
TECHNOLOGY IN AC TION™

Raspbian OS
Programming with
the Raspberry Pi
IoT Projects with Wolfram,
Mathematica, and Scratch

Agus Kurniawan
Raspbian OS
Programming with the
Raspberry Pi
IoT Projects with Wolfram,
Mathematica, and Scratch

Agus Kurniawan
Raspbian OS Programming with the Raspberry Pi: IoT Projects with
Wolfram, Mathematica, and Scratch
Agus Kurniawan
Depok, Indonesia

ISBN-13 (pbk): 978-1-4842-4211-7 ISBN-13 (electronic): 978-1-4842-4212-4


https://doi.org/10.1007/978-1-4842-4212-4
Library of Congress Control Number: 2018964829

Copyright © 2019 by Agus Kurniawan


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Natalie Pao
Development Editor: James Markham
Coordinating Editor: Jessica Vakili
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505,
e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit http://www.apress.
com/rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available
to readers on GitHub via the book's product page, located at www.apress.com/978-1-4842-4211-7.
For more detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
Table of Contents
About the Author���������������������������������������������������������������������������������ix
About the Technical Reviewer�������������������������������������������������������������xi
Acknowledgments�����������������������������������������������������������������������������xiii
Introduction����������������������������������������������������������������������������������������xv

Chapter 1: Introduction to Raspberry Pi�����������������������������������������������1


1.1What Is Raspberry Pi?�������������������������������������������������������������������������������������2
1.2Reviewing the Raspberry Pi Board Models�����������������������������������������������������3
1.3Introducing the Raspbian OS��������������������������������������������������������������������������5
1.4Setting Up Raspbian OS on Raspberry Pi Boards��������������������������������������������7
1.5Headless Raspbian SSH Network Setup���������������������������������������������������������8
1.6 Expanding Storage����������������������������������������������������������������������������������������10
1.7Configuring a WiFi Network��������������������������������������������������������������������������12
1.8Exploring the Raspbian OS Desktop and Terminal����������������������������������������13
1.9Configuring the VNC Server��������������������������������������������������������������������������16
1.9.1Installing the VNC Server����������������������������������������������������������������������17
1.9.2Enabling the VNC Server�����������������������������������������������������������������������17
1.9.3Configuring Boot Options for the Desktop��������������������������������������������19
1.9.4 Testing the Server���������������������������������������������������������������������������������21
1.10Powering Off the Raspbian�������������������������������������������������������������������������24
1.11 Summary����������������������������������������������������������������������������������������������������25

iii
Table of Contents

Chapter 2: The Raspbian OS Command Line���������������������������������������27


2.1Introducing Raspbian Shells�������������������������������������������������������������������������28
2.2The Basic Raspbian Shell������������������������������������������������������������������������������30
2.2.1Rebooting Raspbian OS������������������������������������������������������������������������30
2.2.2 Shutting Down��������������������������������������������������������������������������������������30
2.2.3 Configuring the Timezone���������������������������������������������������������������������31
2.2.4Configuring the Keyboard���������������������������������������������������������������������33
2.3 Manipulating Files and Directories���������������������������������������������������������������34
2.3.1Getting the Current Working Directory��������������������������������������������������34
2.3.2Listing Files and Directories�����������������������������������������������������������������34
2.3.3Understanding the ls Parameters���������������������������������������������������������37
2.3.4Changing the Current Working Directory����������������������������������������������38
2.3.5Creating a Directory������������������������������������������������������������������������������42
2.3.6Removing Files and Directories������������������������������������������������������������44
2.3.7Copying Files and Directories���������������������������������������������������������������46
2.3.8Moving Files and Directories����������������������������������������������������������������50
2.3.9Creating Symbolic Links�����������������������������������������������������������������������52
2.4 Redirection����������������������������������������������������������������������������������������������������53
2.4.1 Standard Output�����������������������������������������������������������������������������������53
2.4.2 Standard Input��������������������������������������������������������������������������������������54
2.4.3 Standard Error��������������������������������������������������������������������������������������55
2.4.4 Pipelines�����������������������������������������������������������������������������������������������56
2.5 Permissions��������������������������������������������������������������������������������������������������57
2.5.1 Understanding Permissions������������������������������������������������������������������57
2.5.2 chmod���������������������������������������������������������������������������������������������������61
2.5.3 chown���������������������������������������������������������������������������������������������������63

iv
Table of Contents

2.6 Manipulating Processes��������������������������������������������������������������������������������64


2.6.1 ps����������������������������������������������������������������������������������������������������������64
2.6.2 top��������������������������������������������������������������������������������������������������������68
2.6.3 Killing Processes����������������������������������������������������������������������������������70
2.6.4 Viewing Memory�����������������������������������������������������������������������������������71
2.7 Media Storage�����������������������������������������������������������������������������������������������72
2.7.1Displaying Free Disk Space������������������������������������������������������������������72
2.7.2 mount���������������������������������������������������������������������������������������������������73
2.7.3 umount�������������������������������������������������������������������������������������������������77
2.8 Summary������������������������������������������������������������������������������������������������������77

Chapter 3: Programming on Raspbian OS������������������������������������������79


3.1Understand the Programming Model in Raspbian OS�����������������������������������79
3.2Setting Up the Programming Environment���������������������������������������������������83
3.3 Python Programming������������������������������������������������������������������������������������83
3.3.1Python 3 (IDLE)�������������������������������������������������������������������������������������84
3.3.2 Thonny Python IDE��������������������������������������������������������������������������������85
3.3.3Python Shell from Remote SSH������������������������������������������������������������88
3.3.4 What’s Next?�����������������������������������������������������������������������������������������90
3.4 Node.js Programming�����������������������������������������������������������������������������������90
3.5 C/C++ Programming�������������������������������������������������������������������������������������94
3.6 Summary������������������������������������������������������������������������������������������������������96

Chapter 4: Computational Mathematics with the Wolfram


Language and Mathematica���������������������������������������������������������������97
4.1Introducing Wolfram Language and Mathematica����������������������������������������98
4.2Setting Up Wolfram and Mathematica��������������������������������������������������������101
4.3Developing a Hello World Program��������������������������������������������������������������102

v
Table of Contents

4.4 Basic Programming�������������������������������������������������������������������������������������103


4.4.1Data Types and Declaring Variables���������������������������������������������������104
4.4.2 Arithmetic Operators��������������������������������������������������������������������������105
4.4.3Relational and Logical Operators��������������������������������������������������������106
4.4.4 Conditional Statements����������������������������������������������������������������������108
4.4.5 Looping�����������������������������������������������������������������������������������������������111
4.4.6 Adding Comments������������������������������������������������������������������������������116
4.4.7 Functions��������������������������������������������������������������������������������������������117
4.5 Computational Mathematics�����������������������������������������������������������������������119
4.5.1 Calculus����������������������������������������������������������������������������������������������119
4.5.2 Matrix�������������������������������������������������������������������������������������������������132
4.5.3 Quadratic Equations���������������������������������������������������������������������������137
4.5.4 Linear Equations���������������������������������������������������������������������������������138
4.6 Summary����������������������������������������������������������������������������������������������������140

Chapter 5: Visual Programming with Scratch����������������������������������141


5.1Introducing Visual Programming and Scratch���������������������������������������������142
5.2 Setting Up Scratch��������������������������������������������������������������������������������������143
5.3Developing a Hello Program������������������������������������������������������������������������143
5.3.1Creating a Project�������������������������������������������������������������������������������143
5.3.2Building a Scratch Program����������������������������������������������������������������145
5.3.3Running the Program�������������������������������������������������������������������������148
5.3.4Saving a Program Into a File��������������������������������������������������������������149
5.4 Working with Sprites�����������������������������������������������������������������������������������150
5.5Working with the Background���������������������������������������������������������������������155

vi
Table of Contents

5.6 Working with Motion�����������������������������������������������������������������������������������159


5.6.1Coordinate System and Direction�������������������������������������������������������160
5.6.2Demo 1: Movement�����������������������������������������������������������������������������162
5.6.3Demo 2: Direction�������������������������������������������������������������������������������163
5.7Working with Control Blocks�����������������������������������������������������������������������165
5.7.1Building a Decision�����������������������������������������������������������������������������165
5.7.2 Looping�����������������������������������������������������������������������������������������������173
5.8 Summary����������������������������������������������������������������������������������������������������175

Index�������������������������������������������������������������������������������������������������177

vii
About the Author
Agus Kurniawan is a lecturer, researcher, IT consultant, and an author. He
has 17 years of experience in various software and hardware development
projects, delivering materials in training and workshops, and technical
writing. He has been awarded the Microsoft Most Valuable Professional
(MVP) award 14 years in a row.
His topic interests are software engineering, embedded system,
networking, and security system. He has been working as lecturer and
researcher at the Faculty of Computer Science, Universitas Indonesia.
Currently, he is pursuing a PhD in computer science at the Freie
Universität Berlin, Germany. He can be reached on his blog at
http://blog.aguskurniawan.net and Twitter at ­@agusk2010.

ix
About the Technical Reviewer
Massimo Nardone has more than 22 years of experiences in security, web/
mobile development, cloud, and IT architecture. His true IT passions are
security and Android.
He has been programming and teaching how to program with Android,
Perl, PHP, Java, VB, Python, C/C++, and MySQL for more than 20 years.
He holds a Master of Science degree in Computing Science from the
University of Salerno, Italy.
He has worked as a Project Manager, Software Engineer, Research
Engineer, Chief Security Architect, Information Security Manager, PCI/
SCADA Auditor, and Senior Lead IT Security/Cloud/SCADA Architect for
many years.
Technical skills include: Security, Android, Cloud, Java, MySQL,
Drupal, Cobol, Perl, web and mobile development, MongoDB, D3, Joomla,
Couchbase, C/C++, WebGL, Python, Pro Rails, Django CMS, Jekyll,
Scratch, etc.
He currently works as Chief Information Security Office (CISO) for
Cargotec Oyj.

xi
Acknowledgments
We would like to thank Apress for all their help in making this book
possible. Specifically, we would like to thank Aaron Black, our acquisitions
editor, and Jessica Vakili, our coordinating editor, for helping us complete
the Raspbian book.
Special thanks to our development editor, James Markham, and
technical reviewers, Chaim Krause and Massimo Nardone, for all of their
suggestions during the editorial review process that helped make this a
great book.
We would also like to thank the Raspberry Pi and Raspbian
communities anywhere in the world for contributing and making learning
Raspberry Pi with Raspbian easy.
Last but not least, a thank you to my wife, Ela and my children, Thariq
and Zahra, for their great support while I completed this book.

xiii
Introduction
Raspberry Pi is a mini computer that you can operate as a normal
computer. The Raspberry Pi board is one of recommended development
boards with IoT platforms. There are many features on the Raspbian OS
and Raspberry Pi boards that you can use to build IoT programs in various
scenarios. Raspberry Pi is designed to enable you to scale its capabilities
through GPIO pins that are suitable for your business and research needs.
Raspbian OS Programming with the Raspberry Pi is a quick reference
to build programs on top of the Raspbian OS on a Raspberry Pi board.
You’ll start by learning Raspbian shells to develop programs. You will go
through a step-by-step guide with project samples to learn the ins and outs
of the Raspbian OS development. You will also learn about the Wolfram
language, Mathematica, and Scratch.

Who This Book Is For


This book is designed for anyone who wants to get started with Raspberry
Pi and Raspbian. Readers do not need knowledge of the Linux OS or of
embedded systems.

How This Book Is Organized


This book is designed with a step-by-step approach. You will learn how
to set up Raspbian on a Raspberry Pi board. You will also learn how to
develop programs on Raspbian. This book explains how to work with
Wolfram, Mathematica, and Scratch. Some scenario problems are
provided so you can practice during the learning process.

xv
Introduction

 equired Software, Materials,


R
and Equipment
In general, you need a Raspberry Pi 3 board and a microSD card with
Raspbian OS installed. All required software in this book is installed with
the Raspbian OS.

xvi
CHAPTER 1

Introduction
to Raspberry Pi
Raspberry Pi is a development board that can be applied to build IoT
applications. Various sensors and actuator devices can be attached to the
board. In this chapter, we explore Raspberry Pi and cover its models.
We also learn how to set up the board for the first time.
The following list of topics is covered in this chapter:

• Learn about the Raspberry Pi

• Review the Raspberry Pi models

• Learn about the Raspbian OS

• Set up Raspbian OS on a Raspberry Pi board


• Perform headless Raspbian SSH network setup

• Configure a WiFi network

• Explore the Raspbian OS desktop

• Configure the VNC server

• Learn to power off the Raspbian

© Agus Kurniawan 2019 1


A. Kurniawan, Raspbian OS Programming with the Raspberry Pi,
https://doi.org/10.1007/978-1-4842-4212-4_1
Chapter 1 Introduction to Raspberry Pi

1.1 What Is Raspberry Pi?


Raspberry Pi is a mini computer that you can operate as a normal
computer. This board was developed by Raspberry Pi Foundation in
the UK. Currently, Raspberry Pi runs on the top of an ARM processor.
Raspberry Pi is not a PC, so we couldn’t expect more in computation.
Raspberry Pi is designed to be small in size to perform some processes.
The small form size of the Raspberry Pi form has advantages. We can put
sensor and actuator devices on the Raspberry Pi board and then perform
measurement and sensing.
The first Raspberry Pi Model B board was released in February 2012.
The latest model is the Raspberry Pi 3 B+ board and it was released in
March 2018. You can see this board in Figure 1-1. This board can run an
operating system to perform computations.

Figure 1-1. Raspberry Pi 3 B+ board

The Raspberry Pi board usually exposes GPIO pins, to which we can


attach sensors or actuator devices. Some Raspberry Pi models also provide
network stacks such as Ethernet, WiFi, and Bluetooth. Raspberry Pi can
also be connected to monitor through an HDMI connector.

2
Chapter 1 Introduction to Raspberry Pi

Various operating systems can be applied to Raspberry Pi boards. A list


of supported operating systems for Raspberry Pi can be found at this site:
https://www.raspberrypi.org/downloads/. Raspbian OS is the official
operating system of the Raspberry Pi. This book focuses on Raspbian OS
for implementation and evaluation.

1.2 R
 eviewing the Raspberry Pi Board
Models
There are several Raspberry Pi models that we can use to perform specific
purposes. The latest model as I am writing this book is Raspberry Pi 3
Model B+. This board consists of Broadcom BCM2837B0, Cortex-A53
(ARMv8) 64-bit SoC @ 1.4GHz, with 1GB LPDDR2 SDRAM. The board
also provides Ethernet, WiFi, and Bluetooth 4.2 (BLE). You can see the
Raspberry Pi 3 Model B+ board in Figure 1-1. For further information
about Raspberry Pi 3 Model B+, see https://www.raspberrypi.org/
products/raspberry-pi-3-model-b-plus/.
If you have concerns about hardware size, Raspberry Pi Foundation
has an even smaller version, which is half the size of a credit card. It is
called the Raspberry Pi Zero. There are two models—Raspberry Pi Zero and
Raspberry Pi Zero Wireless. The first model was released in November 2015.
The last model that has a WiFi module was released in February 2017. Both
models run Broadcom BCM2835 MCU with 512MB RAM. You can see the
Raspberry Pi Zero Wireless board form in Figure 1-2.

3
Chapter 1 Introduction to Raspberry Pi

Figure 1-2. Raspberry Pi Zero Wireless board

You also can see and compare several Raspberry Pi models based on
processor, RAM, and network module availability in Table 1-1.

Table 1-1. Raspberry Pi Model Comparison


Raspberry Pi Model Processor RAM Network Modules

Raspberry Pi 3 B+ Broadcom BCM2837B0 1GB Ethernet, WiFi, BLE


Raspberry Pi Zero Wireless Broadcom BCM2835 512MB WiFi
Raspberry Pi 3 Broadcom BCM2837 1GB Ethernet, WiFi, BLE
Raspberry Pi Zero Broadcom BCM2835 512MB -
Raspberry Pi 2 Broadcom BCM2836 1GB Ethernet
Raspberry Pi A+ Broadcom BCM2835 256MB -
Raspberry Pi B Broadcom BCM2835 512MB Ethernet

4
Chapter 1 Introduction to Raspberry Pi

Technically, all the Raspberry Pi models that are shown in Table 1-1
are designed for personal makers and hobbyists. There are limited GPIO
pins on each Raspberry Pi model. If you need more GPIO pins on the
board, you can extend it using GPIO extender modules. The Raspberry Pi
Foundation also released the Raspberry Pi model for industry purposes. It
is called the Raspberry Pi Compute Module. Currently, the latest model is
Raspberry Pi Compute Module V3.
Raspberry Pi Compute Module V3 board hosts 120 GPIO pins, an
HDMI port, a USB port, two camera ports, and two display ports. You
can see the board form in Figure 1-3. For further information about the
Raspberry Pi Compute Module V3, visit the official website at ­http://
socialcompare.com/en/comparison/raspberrypi-models-comparison.

Figure 1-3. Raspberry Pi Compute Module v3

1.3 Introducing the Raspbian OS


Raspbian is an operating system-based Debian optimized for the
Raspberry Pi hardware. When the Raspberry Pi board is released, Raspbian
OS becomes the official OS for Raspberry Pi boards. Raspbian OS is an
open source operating system that was initiated by Mike Thompson
and Peter Green. The official Raspbian project can be found on this site:
https://www.raspbian.org/.

5
Chapter 1 Introduction to Raspberry Pi

If you have experience using Debian and Ubuntu Linux, you should be
familiar with Raspbian OS since this OS is built based on Debian Linux and
optimized on a Raspberry Pi board with ARMv6 CPU.
This book uses Raspbian OS for testing and evaluation. You can
download the Raspbian image file at https://www.raspberrypi.org/
downloads. Currently, Raspbian provides desktop and lite versions. You
can see the download image in Figure 1-4. The Raspbian desktop version is
running Raspbian OS with an installed desktop runtime. The Raspbian lite
version is designed for light usage. It means you will obtain the Terminal
runtime.

Figure 1-4. Download the Raspbian OS image

Next, I show you how to set up Raspbian OS on the Raspberry Pi 3 board.

6
Chapter 1 Introduction to Raspberry Pi

1.4 S
 etting Up Raspbian OS on Raspberry
Pi Boards
The Raspberry Pi models don’t have internal storage unless you’re using
the Raspberry Pi Compute Module. You should attach external storage,
such as an SD card or a microSD card. The new Raspberry Pi board model
uses microSD for external storage.
I recommended that you use a microSD card that’s 16GB. You can
install some libraries, frameworks, and tools for your personal and
business needs. In this section, I’m going to show you how to set up
Raspbian OS on a Raspberry Pi 3 board.
First, download the Raspbian OS image. You can download it at
https://www.raspberrypi.org/downloads. For demo purposes, I chose
the Raspbian Stretch with desktop, as shown in Figure 1-4. To flash the
Raspbian image into the microSD card, you can use Etcher. It’s free and
available for Windows, Mac, and Linux. You can see the Etcher application
in Figure 1-5. Download it from https://etcher.io, based on your
platform, and then install it.

Figure 1-5. Etcher application

7
Chapter 1 Introduction to Raspberry Pi

The Etcher application is easy to use. You can just select your Raspbian
image and target the drive of the microSD card on your computer. Some
computers don’t have microSD card readers, so you need an SDcard
reader. Then put your microSD card into the reader.
After completing the flashing Raspbian step, you can plug your
keyboard, mouse, and monitor into the Raspberry Pi board.
Details about Raspbian installation on the Raspberry Pi board can be
found in the official guideline manual at https://www.raspberrypi.org/
documentation/installation/installing-images/README.md.

1.5 Headless Raspbian SSH Network Setup


Sometimes you won’t want to use a keyboard or monitor to manage
the Raspbian network. We can perform a headless Raspbian network
in this case. In this scenario, the Raspberry Pi board will be connected
to a network via Ethernet. You’ll want to enable an SSH service on the
Raspberry Pi without configuring your keyboard and monitor.
First, load your Raspbian microSD card into your computer. You
should see a Raspbian drive. Now you want to enable SSH on Raspbian.
You can create a file, called ssh without a file extension, with blank
content. Put this file into the Raspbian drive. You can see it in Figure 1-6.
After you’re done, you should plug the Raspbian microSD card into the
Raspberry Pi board. Plug your LAN cable into the Raspberry Pi Ethernet
connector. After that, turn on your Raspberry Pi board.

8
Chapter 1 Introduction to Raspberry Pi

Figure 1-6. Adding an ssh file into Raspbian disk

Wait several minutes to ensure Raspbian has started. You should get
your Raspbian IP address from your router. Now open the SSH
client application. For Windows, you can use the PuTTY application at
https://www.putty.org. For Linux and Mac, you can use the Terminal.
For instance, the Raspbian IP address is 192.168.1.21 and the username is
pi. Then type this command.

$ ssh [email protected]

9
Chapter 1 Introduction to Raspberry Pi

You should be able to access the Raspbian Terminal remotely. You can
see an example of remote SSH in Figure 1-7.

Figure 1-7. Connecting to Raspbian via SSH

1.6 Expanding Storage


Before you install any libraries, frameworks, or tools, I recommend that
you expand the Raspbian disk. You can open Raspbian Terminal from the
desktop or by using remote SSH. Type this command.

$ sudo raspi-config

10
Chapter 1 Introduction to Raspberry Pi

You should see the form shown in Figure 1-8.

Figure 1-8. Select Advanced Options

From the main menu (see Figure 1-8), you can select the Advanced
Options menu. Then, you should see the form that is shown in Figure 1-9.
Select the Expand Filesystem option. After that, you will obtain
confirmation. If you’re done, Raspbian will expand your disk.

11
Chapter 1 Introduction to Raspberry Pi

Figure 1-9. Expand the filesystem

1.7 Configuring a WiFi Network


Raspberry Pi 3 has a built-in WiFi network. You can connect this WiFI to
existing WiFi networks. If you are working on the Raspbian Desktop, you
can see the WiFi icon on the top right. Figure 1-10 shows an arrow pointing
to the connect WiFi option.

12
Chapter 1 Introduction to Raspberry Pi

Figure 1-10. Connect to existing WiFi

After you select one of the WiFi SSIDs, you probably will be asked for
the SSID pin. Fill in the SSID pin and then your Raspbian will connect to
the network.

1.8 E xploring the Raspbian OS Desktop


and Terminal
The Raspbian OS desktop has a look and feel like other operating systems.
Some applications have been installed for you, such as the Chrome
browser, Wolfram, Mathematica. A form of the Raspbian OS can be seen in
Figure 1-11.

13
Chapter 1 Introduction to Raspberry Pi

Figure 1-11. Raspbian Scratch OS desktop on Raspberry Pi 3

14
Chapter 1 Introduction to Raspberry Pi

If you click on the Raspberry Pi logo on the top-left, you should see a
main menu, as shown in Figure 1-12. You can see a list of applications and
the managing systems.

Figure 1-12. Main menu on Raspbian desktop OS

For instance, open a browser from the Internet menu. You can surf the
Internet as you do in a normal browser. Raspbian installed Chromium as
its default browser application. You can see this browser in Figure 1-13.

15
Chapter 1 Introduction to Raspberry Pi

Figure 1-13. Opening a browser for Internet access

1.9 Configuring the VNC Server


You will probably access Raspbian desktop remotely, so you don’t need
to use the keyboard and monitor to access the Raspbian desktop. In
this section, we install the VNC server. An Internet network is required
to perform this task. Make sure your Raspberry Pi has connected to the
Internet via a LAN or a WiFi network.
To do this, you will perform these steps:

1. Install the VNC server.


2. Enable the VNC server.

3. Configure the boot option for desktop.


4. Test with the VNC viewer.

Each task is presented in detail in the following sections.

16
Other documents randomly have
different content
chivalrous, hospitable and sporty. Jack Diamond is a representative
Virginian. He is all right.”
“Yis, he seems to be since he got back inther this parrut av th’
country, but it’s a growler Oi thought he wur at firrust.”
“He did not seem like himself while we were in the West,”
confessed Frank. “I was surprised at the change in him, but I knew
it was not natural, and I bore with him.”
The others came up, Frank mounted his wheel, and they all
rode along together, chatting pleasantly. Frank was questioned, and
he told of his trip across the continent and back, arousing Kenneth
St. Ives’ interest.
“Well, you must have had sport!” Kenneth exclaimed. “I should
have enjoyed that. Say, father, we must get up something in the way
of sport while they are at Springbrook. Can’t we have a hunt?”
“It’s too early in the season, my son,” smiled Mr. St. Ives.
“I don’t know about that,” declared Kenneth. “We’re liable to
have a frost any morning now. It is chilly at times for this season.
Perhaps to-morrow morning——”
“The Meadowfair Club visits us to-morrow, you know.”
“I had forgotten that. So much the better! If Mr. Merriwell and
his friends will stay, we’ll find some sort of sport to amuse them.”
The top of the hill was reached, and then Springbrook Farm was
pointed out, lying on a hillside two miles distant. It was a beautiful
place. The great stables seemed modern, but the house was an
immense colonial mansion, surrounded by tall trees. The farming
land was a broad prospect of cleared land, upon which were great
meadows and small groves. Cattle and horses were to be seen, and
it had the appearance of a stock or dairy farm.
“There is the place, Mr. Merriwell!” cried Kenneth St. Ives; “and
a more beautiful spot is not to be found in all Pennsylvania.”
Frank did not wonder at Kenneth’s enthusiasm.
Not far from the old mansion was a small lake, with a boathouse
on the shore, and some boats lying near.
Frank felt sure that the rest of the party could not be far behind,
so Barney would not be compelled to wait long; but it was necessary
that some one should meet them, as Springbrook Farm lay off from
the main highway, being reached by means of a private drive, and
the bicyclists, unless notified, would not know Frank contemplated
stopping there.
Barney was willing to wait for them, and so the others rode
onward, Frank wheeling along and chatting with them all.
Stephen Fenton was seen riding up the last incline toward the
distant mansion, still forcing his horse.
When the place was reached a hostler was at work over Firefoot
in one of the stables, and the animal showed the abuse it had
received.
Mr. St. Ives dismounted and looked Firefoot over, observing:
“That’s fine shape for a horse to be in after a canter along the
road. The creature could not look worse if it had been following the
hounds across country. I think Stephen will have to take another
horse the next time he goes out.”
“Beggin’ yer pardon, sir,” said the hostler, with gruff respect;
“but he says as how he were not to blame. You knows, sir, as how
this beast is onruly, sir, an’ Mr. Fenton says it were skeered by some
saucy chaps on bisuckles that paid no attention to its snortin’ an’
rearin’. You know yerself, sir, as how most of the bisuckle riders are
sassy villains, sir.”
This was said regardless of the fact that Frank had trundled his
wheel into the stable, and the hostler could not help knowing a
cyclist was hearing every word he spoke.
Preston St. Ives did not deign to make any reply to the hostler’s
words, but said:
“See that Firefoot is well rubbed down and cared for, Wade. You
need not let Stephen have him again. Remember.”
“All right, sir—all right,” muttered the hostler, glancing at Frank
in a side-long manner. “You knows your business, sir, an’ I’m here to
take your orders, sir.”
The hostler had several assistants, and they were on hand to
care for the animals just brought in.
Kenneth showed Frank where to leave his wheel, and then
Merry followed the youth into the house.
CHAPTER XXI—TWO ENCOUNTERS

“Vale,” grunted Hans, as he stretched himself on the ground in the


shade of some shrubbery, “uf dese don’t peat der pand, you vos a
liar!”
“Wal, I’m swuzzled ef it ain’t pretty gol darn slick,” agreed
Ephraim, thrusting his hands into his pockets and looking around
admiringly. “It’s queer haow Frank falls inter sech snaps as these.
Heer we be invited to stay right heer at this place an’ make
aourselves to hum jest as long as we want to.”
“And I feel as if I could remain here forever,” grunted Bruce,
from a comfortable hammock, of which he had taken immediate
possession on seeing it. “There’s something soothing and restful
about this place that agrees with my nerves and promises balm and
healing for my constitution that has been shattered by Arkansaw
chills. It’s simply great!”
“It is rather jolly,” said the voice of Harry from the cool shadows
of a vine-covered arbor.
“But it’s tame it’d be afther a bit, me b’ys,” declared Barney
Mulloy, who was leaning against the trunk of a tree. “It’s sbort we’re
lookin’ afther, an’ it’s ded quoiet here.”
“Mr. Kenneth St. Ives promises us some sport if we care to
remain,” put in Bart Hodge, quietly.
“Phwat sort av sbort do yez think they can scare up here?”
asked Barney, with a trace of contempt in his voice. “It’s croquet we
moight play, but thot’s altogither too excoiting.”
“Yaw,” grunted Hans; “dot growkay likes me, for id don’d peen
so much drouble to blay him. Der balls can knock me apoud shust so
easy as nefer vas.”
“Frank and Jack seem to be enjoying some mild sport,” said
Harry, as the click of billiard balls and Merriwell’s infectious laugh
came from the open windows of a large summerhouse in the
shrubbery close at hand.
“Those fellows never seem to care about resting,” grunted
Browning. “They will wear themselves out long before they are old
men, unless they let up in their wild career.”
All of the boys had reached Springbrook Farm, and Toots was
taking care of their wheels. They had been left to themselves for a
time, while Preston St. Ives and Kenneth went away to see that
proper arrangements were made for the entertainment of their
guests.
It had not taken Frank and Jack long to find the billiard table
and get into a game, pulling off their jackets to it, as if they were in
deadly earnest.
As the boys lolled there in the shade, they saw Harry Harden
and Iva St. Ives come down a walk and pass near them, chatting
and laughing, seeming well satisfied with each other’s society.
At a distance behind them, taking care not to be seen, Stephen
Fenton stole along, keeping jealous watch of them.
“Aisy, b’ys,” warned Barney, speaking softly. “Take a look at th’
spalpane through th’ bresh here. It’s a dirruty face he has, or me
name’s not Mulloy.”
“That’s what he has,” nodded Hodge, who took an instant dislike
to Fenton. “Who is he? Is that the fellow who was with Miss St.
Ives?”
“Th’ same, bad cess to him! She was afther callin’ him ‘cousin’.”
“He is following them!” exclaimed Harry, softly. “You don’t
suppose he will try any crooked work, do you?”
“Oi have a fancy Misther Harden can look out for hisself, me
lads,” said Barney. “Oi’ll back him against Mr. Fenton.”
“Yaw,” said Hans. “When Parney says dot, id peen all right. He
knows my pusiness.” Then the Dutch boy relapsed into a position of
comfort again, while the jealous spy passed on, watching the couple
ahead of him.
Five minutes later the boys were startled by the sound of
excited voices and a feminine cry of alarm.
Barney seemed to be waiting for that sound, for he sprang away
like a flash, and Bart Hodge was not far behind him. Through the
shrubbery crashed the two, and, in a moment, reached a spot where
they were able to see what was taking place.
One young man was rising from the ground, while another
stood over him, with clinched fists, evidently having knocked him
down. To the arm of the latter, begging him not to strike again,
clung Iva St. Ives.
“Oi knew it!” chuckled Barney in delight. “It’s Fenton thot
interfared, an’ th’ other b’y knocked him down.”
In truth, Fenton it was who was getting up from the ground,
while it was plain that he had been struck by Harden.
“Oh, I’ll even this!” snarled the man who had received the blow.
“Come on!” cried Harden, whose blood was aroused.
“Stop, Cousin Stephen—stop, Mr. Harden!” cried the girl, in
distress. “You shall not fight!”
“He insulted me!” flamed Harden.
“I called you a sneaking cur, as you are!” hissed Fenton, getting
upon his feet.
“And I knocked you down, as you deserved!” flung back the
other young man.
“Hurro!” came softly from the lips of the Irish lad. “Thot’s th’
shtuff! Sail in, Misther Fenton, an’ do up th’ spalpane!”
At this moment the other boys, with the exception of Browning,
came crashing through the hedge, and were by the two young men.
Fenton looked up, muttered an imprecation and then sibilated at
Harden:
“We will settle this some other time!”
“At any time you like,” was the prompt retort.
Then Fenton whirled and quickly vanished in the shrubbery.
“It’s all over,” said Hodge. “Let’s get out of this instanter, for it
must be a trifle embarrassing to Miss St. Ives.”
This little encounter had revealed to the boys that Fenton was
jealous of Harden, who, plainly enough, was paying attentions to
Iva.
“I believe Fenton is a bad man to have for an enemy,” said
Rattleton, with unusual seriousness, as the boys once more gathered
about the hammock, which Browning had not left for all of anything
that was taking place beyond the shrubbery.
“Well,” said Hodge, slowly, “it’s not likely he is in love with
Frank, for Merry was not willing to be imposed upon by him. Frank
may have to look out for the fellow.”
“What’s that you are telling about me?” called the pleasant voice
of Frank himself, as he emerged from beneath the vines over the
door of the summerhouse followed by Diamond. “I’m all the time
looking out for somebody. Here I’ve been having the battle of my life
with Jack, and only beat him one point. I won the game on a fluke,
at that.”
“But he won it, as he always wins everything he goes into,” said
the Virginian, with traces of mingled vexation and admiration.
Toots came panting toward the spot all out of breath.
“Lordy! Lordy!” he gasped; “I done ’clare teh goodness; I’s
’feared to stay ’roun’ dat stable any mo’!”
“What’s the matter?” asked Frank. “You haven’t cleaned up all
those wheels as soon as this?”
“No, sar; but dat hostler in dar am crazy ma-ad, sar.”
“What’s the matter with him?”
“He done suffin’ to dat hawse Fiahfoot, an’ de hawse don kick
him up again’ de side ob de stall. Wondah it didn’t kill him, sar! Po-
erful wondah it didn’t bre’k some ob his bones! Made him so mad he
got a fork an’ was gwan teh stick it right inteh dat hawse. I couldn’t
stan’ teh see dat, an’ I hollered. Den he see I was a-watchin’ ob him,
an’ he was ma-ad enough teh kill meh, sar. I don’ dar’ stay an’ clean
dem bisuckles, Marser Frank.”
“Those wheels must be cleaned to-night,” said Merriwell,
decisively. “Come with me, Toots, and I will settle this thing so the
hostler will not interfere with you.”
He strode away toward the stable, and the colored boy followed
at his heels. Hodge and Rattleton followed more leisurely.
As Frank entered suddenly he detected the hostler, wrench in
hand, doing something to one of the bicycles. It looked as if the man
was making an attempt to ruin the wheel.
And it happened that the wheel belonged to Frank!
Three bounds took Merriwell to the side of the man, whom he
grasped by the collar, crying:
“What are you doing there?”
The man straightened up, and turned his bloodshot eyes on the
youth. His face was flushed, and the odor of his breath told he had
been drinking heavily.
“Leggo!” he snarled; “leggo, or I’ll smash ye!”
“What were you doing to that wheel?” demanded Frank.
“None o’ yer business!” roared the hostler. Then he dropped the
wrench, and made a swinging blow at the boy.
Frank dodged the blow and thrust out his foot in a manner that
sent the awkward man sprawling.
“Land ob wartermillions!” squawked Toots, delighted.
As the hostler scrambled up, his fingers encountered the handle
of the wrench and closed around it. His face was purple with anger,
and there was a furious glare in his bloodshot eyes. The thick lips,
purple and swollen, curled back from his tobacco-stained teeth, and
with a snarl that might have issued from the throat of some wild
beast, he flung the wrench at Frank’s head.
“Look out dar!”
Toots uttered the cry, but Merriwell was watching the man
closely, and he dodged the missile, which went whizzing past with an
unpleasant sound.
A man was just stepping in at the door, and the wrench struck
him on the breast, knocking him down as if he had been shot.
Then Rattleton and Hodge came running up, and bent over the
fallen man, who lay groaning on the ground.
It was Stephen Fenton!
The hostler seemed suddenly sobered by his act.
“Gosh!” he muttered. “It were Steve I hit! Hope I didn’t kill
him!”
Frank was keeping watch of Wade, but saw the man was
appalled by the result of his angry act, and so ventured to turn
about and hasten to Fenton’s side.
“Bring some water!” he ordered. “He may be seriously injured!”
Fenton’s face was purple, and he was gasping for breath, but,
as Merriwell stooped to lift his head, he feebly but savagely
motioned him back.
“Hands off!” gasped the man. “Keep away from me!”
Toots came running up with some water.
“Heah, boss!” he cried; “heah’s yo’ watah!”
“What do I want of water! Anybody—got some—whiskey?”
“Here!” cried Wade, quickly stepping forward, and taking a
bottle from a pocket inside his red flannel shirt; “here’s a bit.”
It was a pint bottle, nearly a third full. Fenton grasped it with a
shaking hand as he sat up, lifted it to his lips, and did not take it
down till he had swallowed the last drop.
With a growl, he got upon his feet, flinging the empty bottle
aside. He gave Frank a fierce look, then addressed Wade:
“What’s the matter with you, Bill? Did you want to kill me?”
“I didn’t throw it at ye, Steve—I mean Mr. Fenton. I didn’t mean
ter hit ye.”
Fenton rubbed his chest and coughed.
“Lucky you didn’t kill me,” he said, huskily.
Kenneth St. Ives appeared.
“What’s the matter here?” he asked.
The hostler hastened to explain that he was simply moving the
bicycles out of the way when Frank Merriwell assaulted him.
“It was my wheel,” said Frank, making a hasty examination,
“and he has loosened things up generally around it. If I were to
attempt to ride it now without putting it in shape, the chances are
that I would break my neck the first hill I came to. It is plain enough
that this wheel has been doctored to give me a fall.”
Kenneth examined it, and saw at a glance that Frank was right.
Still, the hostler protested that he had done nothing to the wheel
save move it over slightly, so it would not be in the way.
“These wheels are not in your way, Wade,” said Kenneth,
sternly, “and you may let them alone. You have been drinking, and
you know that means you stand a good chance of losing your
position.”
The hostler looked sullen and subdued, but said nothing. His
assistants had appeared, attracted by the sound of the encounter,
but they were holding aloof.
Kenneth reprimanded Wade severely, and then informed Frank
that supper was ready for the party.
The boys had been given a chance to wash up, and soon they
were seated about a long table in the cool dining-room of the old
mansion, with Kenneth St. Ives acting as host.
CHAPTER XXII—HANS USES THE
HOSE

A jolly party it was. They laughed, and joked, and told stories. They
ate, and drank, and were happy. Browning fairly groaned with
satisfaction, and then tried to disguise the groan by a cough. Hans
gasped as he looked about at the good things with which the table
was loaded, and his eyes bulged.
“Shimminy Ghristmas!” he gurgled. “I feel like all dot stuff could
ead me up und not half dry. I ain’d seen nottings like dot for so long
dot you don’d rememper id.”
“Wal, gol darned ef this air ain’t a slappin’ good layout!”
observed Ephraim. “I was beginnin’ to wish I was to hum on the
farm where I could git some baked ’taturs, but baked ’taturs won’t
cut no ice with me arter I git threw with this fodder.”
“Hearty appetites are in vogue at Springbrook Farm,” laughed
Kenneth; “and I want you all to eat till you are perfectly satisfied.
Athletes should eat well at times.”
“Yaw,” nodded Hans, “I pelief me; but dot Vrankie Merrivell
peen keepin’ der barty in draining so much dot I don’d had nottings
to ead vot you like two veeks a time at. Dot kindt uf pusiness makes
you got fat like a ghost.”
“Speaking about ghosts,” said Kenneth, with a sly wink at
Merriwell, “there is a story that our summerhouse is haunted. As you
fellows are going to stop there to-night, I trust you will not be
troubled by spirits.”
Hans’ jaw dropped.
“Vot?” he squawked. “I don’d toldt you dere peen a ghost dot
house in?”
“Sure,” nodded Kenneth. “Those who have seen it describe it as
a tall, white figure, and those who have felt it say it has clammy, ice-
cold hands.”
“Woo!” cried Hans, shivering. “I don’d pelief I vant to slept dot
summerhouses in!”
“Oh, the ghost only appears occasionally, and it is not at all
likely it will visit the summerhouse to-night.”
“Vale, you don’d know apout dot. Uf dot ghost heard I vos here,
he peen sure to come. Uf you gif me a bistol und dot ghost came,
mape he peen aple to shot me.”
“You mean that you will be able to shoot the ghost.”
“Yaw, I meant dot I peen aple to peen shot der ghost py.”
“That wouldn’t hurt him any. Spooks don’t mind being shot.”
“I don’d toldt you dot? Oxcuse me! I vill slept py der open air. I
don’d care apout sleepin’ in dot summerhouses.”
“Oh, say!” exclaimed Ephraim; “gol darn it! can’t you see you’re
bein’ guyed. There ain’t no ghost there at all.”
“How you known dot, Efy?”
“Why, see um larf at ye! Can’t you tell by the way they act?”
But the Dutch boy was not satisfied, and it worried him greatly
to think he might be visited by a ghost that night. He insisted that
he would not sleep in the Summerhouse unless provided with a gun.
After supper however, Kenneth took Hans aside and explained
that a bullet from a gun or a charge of grapeshot and canister out of
a cannon would not have the least effect on a ghost, but that ghosts
could not stand water.
“In the room where you are to sleep to-night,” said Kenneth,
“there is a hose pipe with a stopcock nozzle. All you need to do is
take the nozzle end of the pipe to bed with you. If the spook
appears, point the nozzle at him, turn the stopcock, and let him have
it. He will be knocked out in the first round.”
“Vos dot der lefel on?” asked Hans, suspiciously.
“That is strictly on the level,” assured Kenneth,
“Vale, den I done dot. Let dot ghost come, und I vill gif him der
greadest path vot I efer got.”
In the meantime, Frank Merriwell had taken Ephraim aside, and
was saying:
“Gallup, you must scare the wits out of that Dutchman to-night.
You are the tallest one in the party, and so you must wrap yourself
in a sheet and play ghost on him. St. Ives is going to fix it so we can
all hide behind a curtain in one corner of the room and see the fan.
Will you do the trick?”
“Course I will,” nodded Ephraim. “I’ll skeer the Dutchman aout
of his senses, b’gosh! Won’t it be heaps of fun!”
“Sure it will,” nodded Frank. “You must strip yourself of all your
clothes, so you will look as gaunt as possible, then wrap the sheet
around you and stalk in on Hans. He’ll have a fit.”
“Haw! haw! haw!” laughed the Vermonter. “I know I’ll die of
larfin’ to see him! Haw! haw! haw!”
So it was arranged, and Frank hastened to tell the other boys.
“This is where Ephraim gets taken in,” smiled Merry. “Kenneth
St. Ives has arranged for him to turn the hose on the spook, if one
appears. If Hans is not too frightened to do anything, he’ll give
Ephraim the surprise of his life. With nothing but a sheet over him,
the water from the hose will go through to Gallup’s skin the first
squirt, and we’ll be where we can see the fun.”
With no small difficulty Hans was induced to sleep alone in a
room of the summerhouse. At one end of the room was an alcove
that served as a wardrobe. In front of this alcove was a curtain.
Kenneth arranged it so that the hose attached to the private
waterworks of Springbrook Farm was run in at the window of the
Dutch boy’s room, and a full head of pressure kept on. He showed
Hans how to turn the stopcock and let the water fly at the spook.
Just before the party was ready to retire Frank came upon
Gallup and Dunnerwust, who were talking together and laughing in
an odd manner.
“Here!” exclaimed Merry, “what are you fellows chuckling over?”
He was afraid the Dutch boy had told Ephraim about the
manner in which he expected to vanquish the ghost.
“Haw! haw! haw!” laughed Ephraim. “I was jest tellin’ him I’d
eat the gol darn ghost if he’d ketch it.”
“Yaw!” chuckled Hans; “und I toldt him I peen retty to pet zwi
tollars der ghost vould ketch it. He don’d know vot I mean py dot,
un don’d you toldt him nottings.”
Frank hastened to get the two boys apart, and remained with
Hans till the latter was ready to go to bed.
“You don’d pelief dere peen any ghost, did you, Vrankie?” asked
the Dutch lad, sleepily.
“Of course not,” assured Frank. “That’s a guy yarn St. Ives gave
you. There’s nothing in it.”
“Vale, I peen so sleeby I can’d kept meinseluf avake no longer.
Good-nighd, poys. I vas goin’ to ped.”
Then Hans waddled off to his room.
It was not far from midnight when the boys arose and prepared
for the fun. Kenneth St. Ives was on hand. He had provided some
ice for Ephraim.
“When we all get behind the curtain that hangs before the
alcove,” said Kenneth, “you come into the room, Gallup, stalk up to
the bed and run this piece of ice around over the Dutchman’s face.
If that don’t frighten him out of his wits, I’ve made a big mistake.”
“It’s a yell thot’ll wake ivrybody fer a moile he’ll be afther givin’
whin he fales th’ oice an’ sees Ephraim in the whoite shate,”
chuckled Barney.
In pajamas and nightclothes, the boys tiptoed up to the door of
Hans’ room, opened it softly, and listened.
Hans was snoring.
One by one, the young jokers slipped into the room and
concealed themselves behind the curtain. The moon was up, and a
broad strip of light came in by the window and made the room light
enough for them to watch what was to take place.
With a sharp knife, which went the rounds, each boy cut a slit in
the curtain so he could peer out.
When everything was ready for the appearance of the “ghost,”
they were startled to hear Hans muttering:
“I know how to feex you. Vater—goot coldt vater; Oh, uf I don’d
gif you a path, you vos a liar!”
“He is sleeping in his talk—I mean, talking in his sleep,”
whispered Rattleton. “He is thinking of the way he will fix the ghost.
Oh, my! what a joke!”
Then he clasped a hand over his mouth to keep from laughing
aloud to think what fun they would have.
“Ven you peen all retty you said so,” muttered Hans, apparently
continuing to talk in his sleep.
“Wal,” said the “ghost,” speaking aloud, to the astonishment of
the boys behind the curtain, “I ruther guess ev’rything’s all ready.
Let her rip!”
Then the curtain behind which the jokers crouched was
suddenly snatched away.
At the same instant, Hans sat up in bed, and turned the
stopcock of the hose.
Swish—spat!
A powerful stream of chilling water shot through the air directly
toward that alcove. If struck the astounded boys, drenching them in
a moment and knocking some of them over. The others piled upon
the fallen ones, and all shouted with astonishment and disgust.
Then Hans, grasping the hose, bounced to his feet, standing
upright in the middle of the bed, and poured the stream of cold
water down upon that struggling, squirming mass in the corner.
“Oh, say, vot a shoke dot vos!” cried the Dutch boy, swaying the
nozzle of the hose to evenly distribute the water over all the boys.
“Ain’d you hafin’ fun mit us! I don’d belief you nefer seen der peat uf
dese shoke before all your life in! You don’d vorget der fun vat you
had mit us to-nighd a long dime in.”
“Haw! haw! haw!” roared Ephraim. “Soak it to um, Hans! Ain’t
they havin’ a regular picnic with us! Ho! ho! ho! This is more fun
than hoein’ ’taters!”
“Stop it!” cried Rattleton, gasping for breath. “You blundering
Dutchman turn that hose——Woogh-uh-oogh-uh—oogh!”
The stream from the hose had struck Harry full and fair in the
mouth, and he was nearly drowned.
“Oi’ll murther thot Dutch chaze!” shouted Mulloy. “Oi won’t lave
a whole bone in his body! Oi’ll—— Wa-ow! Murther! Boo! Thot’s
cold! It’s dead Oi am intoirely!”
“Hello, Parney!” called Hans, mockingly; “how you don’d like dot
ghost pusiness, hey? Don’d id peen vunny!”
“Thunder and guns!” roared Browning. “This will give me
another Arkansaw chill! Somebody will get hurt when I find out who
put up this job on me!”
Hodge and Diamond made a desperate attempt to get away, but
Hans saw them, and gave them a straight shot that knocked them
down again in the midst of the struggling, squirming, kicking and
shouting lads.
“Great Cæsar!” cried Kenneth St. Ives, as he untangled himself
from the drenched and kicking mass. “The joke is on us!”
“It looks that way from the road,” admitted Frank, who was
laughing heartily as he crowded his body back into a corner to get
away from the water. “That confounded Yankee was too sharp to be
taken in, and he put up this job with Hans. Goodness! hear him
laugh!”
Ephraim was haw-hawing in a manner that told how delighted
he was, and the roly-poly Dutch boy was dancing up and down on
the bed, as he continued to drench the shivering, scrambling,
shouting lads in the alcove.
“Oh, don’d you think dese pen der most fun I efer had!” gurgled
Hans. “Dese peen der vay to got a shoke a ghost on. Yaw! Vot do I
think uf dese ghost pusiness now, hey?”
“Haw! haw! haw!” roared Ephraim, holding onto his sides, and
doubling up with laughter. “Gol darned ef this wouldn’t make a kaow
larf! Give it to um, Hans!”
“Oh, yaw, I peen goin’ to cool them down. After ’dese don’d you
pelief me ven dey toldt you I vos scared mit a ghost. Hello,
Raddleton! Oxcuse me uf you got der vay in. I didn’d seen you pime-
py. You oxbect I vos havin’ a goot time, hey?”
Harry had been untangling himself from the others, and now he
tried to get up, but the stream of water struck him behind the ear,
and keeled him over once more, plumping his head with great force
fairly into Browning’s stomach.
“Thunder and lightning!” roared the big fellow. “I’d rather be in
a football rush! I’ll give ten dollars to anybody who will pull me out
of this and get me out of the room. My eyes are full of water, and I
can’t see.”
“You don’d haf to took a shower path der morning in,
Prowning,” laughed Hans.
Then St. Ives and Merriwell got hold of each other, and made a
break for the door, doing it so suddenly that they escaped before the
Dutch boy could turn the hose on them. They remained outside,
laughing and calling to the others, who came stumbling blindly out,
one by one, dripping wet and hopping mad.
“The joke is on us, boys,” laughed Frank, “and we may as well
make the best of it. It’s no use to kick.”
CHAPTER XXIII—CHOICE OF
PONIES

Fearing the boys would attempt to retaliate, Hans and Ephraim


closed and barricaded the door, and the Dutch boy shouted that he
would “soak” anybody who tried to force an entrance.
Thoroughly disgusted with the turn affairs had taken, Merriwell
and his friends sought towels and dry clothing, and decided to let
Hans and Ephraim alone for the rest of the night.
In the morning every one about Springbrook Farm knew of the
“ghost joke,” and the boys were “jollied” unmercifully, Kenneth St.
Ives being forced to endure it with the others.
The general uproar in the summerhouse had been heard by
those in the mansion, and it had set the hounds to barking in the
stable, but the shouts of laughter coming from the house told that it
was some sort of frolic, so no one sought to investigate.
Ephraim and Hans came forth in the morning, arm in arm,
although they made a most grotesque couple, the Dutch boy being
short, round and fat, while the Yankee lad was tall, lank and angular.
The faces of this odd pair were grave and solemn, and their air
of innocence was refreshing to behold.
“Good-mornin’, fellers,” nodded Ephraim. “I hope yeou all slept
fust rate late night?”
“How you peen dese mornin’, boys?” inquired Hans, with
apparent concern. “I hope you didn’t disturb me der night in. I peen
aple to slept shust like a top all der night ofer mitout vakin’ ub ad
all.”
“I am glad you slept so well,” smiled Frank. “There was some
noise about the house in the night, and I thought it might have
aroused you.”
“I nefer heard something ad all,” declared Hans. “I pelief me I
hat a tream someding apout a ghost, but dot peen all.”
“Oh, say,” grunted Browning, clinching his huge fist and shaking
it close down by his side. “You wait! There are other days coming!”
“Vell, I hope so,” said the Dutch boy, blankly. “I don’t vant dese
von to peen der last von.”
After breakfast a jolly party came over from the Meadowfair
clubhouse, five miles away. There were nearly a dozen young ladies,
and half as many gentlemen. It was plain they were in the habit of
visiting Springbrook Farm often, for they were warmly welcomed,
and made themselves quite at home.
“This is jolly!” cried Kenneth St. Ives, as he introduced Frank to
Paul Stone, the leader of the party. “I knew something in the way of
sport would turn up to-day. Do you play polo, Mr. Merriwell?”
“Yes,” nodded Frank, with unusual eagerness; “I have played
the game, but it has been some time since I have touched a mallet.”
“Mr. Stone is a member of the American Polo Association, as
also is Steve Fenton, my cousin. Harden and I have applied, and we
expect to get in. Father has caused a beautiful green to be laid over
yonder. He has worked upon it till it is as solid as the finest green in
the country, and we are looking to enjoy several meets here before
we return to the city. We have been having a few games, and I think
it is royal sport.”
“It is the greatest sport in the world!” exclaimed Paul Stone,
enthusiastically.
Frank smiled.
“It can’t be that you have played much football or baseball, Mr.
Stone,” he said.
“Baseball hasn’t the dash and go of polo,” declared Stone; “and
too many accidents happen at football. It is a dangerous game.”
“There is some danger in polo,” said Merry.
“Just enough to make it spicy,” declared Stone. “There is not as
much danger of getting broken noses and broken necks as in
football.”
Frank’s blood was beginning to bound in his veins, for the
thought of a hot, exciting polo game, with its sharp races and its
fierce charges, was quite enough to arouse the sporting instinct
within him. He was like a war horse that sniffs the smoke of battle
from afar.
“Well,” he cried, “if there is to be a polo match, I’d like to get
into it.”
“You can,” laughed Kenneth. “You shall have Liner, the finest
pony in our bunch. That animal knows as much as a human being.
Why, he can almost play polo alone!”
A short distance away Stephen Fenton was talking with another
of the Meadowfair party. He was trying to be sociable in his sullen
way, but his ears were open to all that was passing near at hand,
and he plainly heard the conversation concerning polo.
Kimball, the man Fenton was talking with, also heard something
of it, and he exclaimed:
“Polo is the very thing! I had thought of a coaching party, but it
is too late for that this morning. You’ll play polo, won’t you, Fenton?”
“Yes,” nodded Fenton, “I’ll play with your side.”
“I think that will be agreeable to Stone,” said Kimball; “but I
don’t believe Springbrook will want to give you up.”
“Well, I’ll not play with those stiffs,” muttered the sullen-faced
fellow. “I want a good opportunity to play against them.”
In a short time it was arranged. For Springbrook, St. Ives,
Harden, Merriwell and Diamond were the players; for Meadowfair,
Stone, Kimball, Fenton and a jolly young man by the name of Lock
were to handle the mallets.
“Come, Mr. Diamond and Mr. Merriwell,” called Kenneth; “I will
provide you with suits.”
They followed him into the summerhouse, where such
paraphernalia was kept, and in a short time all three were rigged out
in white breeches, striped blouses and high boots.
“You will find Liner a dandy polo pony, Mr. Merriwell,” declared
Kenneth. “Father paid nine hundred dollars for him.”
“It’s jolly good of you to let me have him, St. Ives,” said Frank.
“Why don’t you ride him yourself? I don’t feel like taking him away
from you.”
“Oh, that’s all right,” laughed Kenneth. “You are my guest. I’ll
ride Coffin Head.”
“Coffin Head! What a name for a horse!”
“He’s an old-timer—a gone-by; but he knows the game, and
that is something in his favor. Of course, I do not expect to cut much
ice with him, but I want Diamond to have a good mount. Coffin
Head has seen his day, but he has been a dandy.”
Frank mentally decided that St. Ives was a fine fellow, and all
right in every way.
They went out to the stable, hearing the ringing sound of a
coach horn, and seeing a coaching party approaching along the
road.
“There’ll be a jolly crowd here!” cried Kenneth. “There’s a party
from Cloverdale. We’ll have no end of sport, fellows!”
There was a flush in Diamond’s cheeks, and it was plain he was
eager for the fray, although he said very little.
Just as they were on the point of entering the stable, Stephen
Fenton rode out on a handsome pony with four white feet and a
general smart look.
St. Ives halted in astonishment.
“Hello, there!” he cried. “What are you doing with that horse,
Steve?”
“I’m going to ride him in the match,” answered Fenton, grimly.
“I guess not!” exclaimed Kenneth. “I have promised Liner to Mr.
Merriwell.”
“Can’t help that,” retorted Fenton, with a sneer. “I rode him in
the last match.”
“And so you should be willing to let somebody else have him to-
day. Don’t be piggish, Steve.”
The man scowled.
“I didn’t suppose anybody would object to letting me have him
to-day, and that is why I took him. I see you are afraid of being
beaten. What pony did you propose to let me have?”
“Any one but that one. I did think of riding Coffin Head, but you
may have him.”
“Coffin Head! You must think I’m a fool! Why, that old cob is
played out, and I’d be a perfect guy on him. You can’t work that on
me, Ken.”
St. Ives was angry. He showed it in his face and voice.
“I don’t care what you ride! You can have anything but Liner.”
“And I’ll have Liner!” flung back Fenton, defiantly. “I’ve got him,
and I’m going to keep him. What can you do about it? We’ll show
you chaps up in great shape.”
Then he started the pony up, and rode away toward the green.
St. Ives seemed about to follow him.
“I’ll make him give that pony up!” he grated. “He has no right to
take Liner! If he doesn’t want to play, let him get out.”
“I wouldn’t have any trouble with him about it,” said Frank. “If
you do, he’ll make a big fuss about our being scared. Let’s look at
the other ponies first, anyway.”
After a few moments of hesitation, St. Ives led the way into the
stable, and the boys looked the other ponies over.
One of them was a homely old crock, with knees and hocks
bunched up out of all semblance to those built on strictly anatomical
principles. This pony attracted Merriwell’s attention.
“That is Coffin Head,” said St. Ives.
Instantly an inspiration seized Frank.
“If you don’t mind,” he said, “I’ll ride Coffin Head.”
Kenneth gasped.
“You can’t mean it!” he exclaimed.
“I do,” nodded Merry. “Somehow I’ve taken a fancy to the old
fellow. You say he has been a good one?”
“One of the best.”
“Then he hasn’t forgotten the tricks of the business. I’m going
to try him.”
“The boys will have sport with you, Merry,” said Diamond.
“Let ’em,” smiled Frank. “I may get as much sport out of it as
they do. May I have Coffin Head, St. Ives!”
“Of course you may if you want him,” said Kenneth, “but I’m
sorry that——”
“Never mind it!” came gayly from Merriwell. “Saddle up old
Coffin Head for me, boy,” he cried, to one of the assistant hostlers.
“I’ll manage to take some part in the game. Hurrah for Coffin Head,
the old-timer! He may prove a surprise party for somebody.”
CHAPTER XXIV—THE FIRST GO

Tang! tang!
It was the timekeeper’s gong, and the game of polo was begun
with a charge.
Each team had lined up within twenty feet of their respective
goals, and, as the ball was dropped in center field, the little ponies
tore forward like blooded racers.
It was a spectacle to send the blood leaping in an instant.
For all that the game had been hastily gotten up, the boundary
line was crowded with the élite of the countryside. It seemed as if
people had risen from the ground.
Merriwell’s friends were all together, and, with the possible
exception of Browning, they were keenly interested. Bruce was
stretched out in a lazy position on the ground, seemingly as
apathetic as usual.
Bart Hodge’s dark eyes were gleaming and his cheeks glowing.
“Oh, if I could have taken part in that!” he muttered. “I don’t
believe Diamond can play the game a bit better than I can.”
Bart was disappointed, and a feeling of jealousy toward
Diamond had been aroused in his heart. It began to seem that Frank
cared too much for Jack.
“It’s queer, too,” thought Hodge. “Diamond was growling all the
time while we were in the West, and he made the rest of the crowd
tired. Merry is the only one who has had any patience with him; but
that’s just like Frank. He’s mighty queer, and I don’t understand him
now, for all that I have known him so long.”
Kenneth St. Ives was captain of the Springbrook side, while Paul
Stone commanded the other side.
“Soy,” cried Mulloy, “will yez take a look at thot ould bob Frankie
is shtraddle av! Did yez ivver see th’ loikes av thot?”
“Gol darned ef that don’t look jest like dad’s old plaow hoss!”
laughed Ephraim Gallup. “Ther sight of that critter makes me wish I
was to hum on the farm. I’m humsick, b’gosh!”
Bruce Browning grunted and looked disgusted.
“Merry must be a fool to take such a pony!” he growled.
“They’re making a guy of him.”
“G’way dar, boy!” muttered Toots, shaking his head. “Don’t yeh
beliebe yehself! Dey don’ mek no guy ob dat boy ver’ much.”
“Say, Browning,” cried Rattleton, excitedly, “you ought to know
better than to think anybody can fake a mool—I mean make a fool
of Frank.”
“Yaw!” nodded Hans; “I oughter known petter dan dot, hand’t
you? Vot do I take you for, Prowning! Vere you peen all my life, ain’d
id? You don’d fool Vrankie Merrivell haluf so much as I think you can,
you pet my axidental bolicy.”
In the opening charge Frank did not get in quite as quick as the
others. Mounted on Liner, Steve Fenton shot down on the ball, and
with a skillful crack, sent it skimming toward the Springbrook goal,
causing a shout to go up from the spectators.
“He’ll make a goal for Meadowfair, in less than two——Great
Scott! how’d the boy do that?”
Frank, somewhat behind the others, had caught the ball as it
skimmed like a bullet over the ground, even though it seemed that
he must have swung his mallet almost at the same instant as
Fenton. The first crack was answered by a second, and the
basswood ball suddenly went skimming back toward the Meadowfair
side, with Diamond racing after it to send it through.
But Liner showed his mettle. It did not seem that Fenton paid
the least attention to the pony, but the creature twisted about in a
moment, and carried its rider along at Diamond’s side.
It was a brief but most exciting race, and the spectators
cheered and waved their handkerchiefs.
“Go it, Diamond, old boy!” cried Harry Rattleton.
“Go id, Shack, oldt poy!” shouted Hans, hopping about like a
toad. “You vill pet on my head!”
“Git doawn an’ crawl, gol darn ye!” whooped Ephraim. “Naow hit
her a knockaout blow, and—— Great gosh!”
In a most skillful manner Fenton’s pony had forced Diamond’s
mount over, and the dark-faced man swung across in time to get a
crack at the ball. The skill with which he struck it told that he was
the most dangerous player on the Meadowfair side.
“Look out there, Harden!” cried St. Ives.
Harry stopped the ball, but it caromed from his mallet and came
near going out of bounds. In a twinkling there was another hot rush
and a threatened crash. Immediately all the players were clumped
about the ball.
“Where are you, number one?” cried Paul Stone. “Strike, Kimball
—strike, man! What’s the matter with you?”
For some moments the ball “hung,” and the players “dribbled”;
but they were cool, and Lock made a neat and quick turn, passing
the ball to Fenton, who took it up and hit it to boundary.
Over the board went the ponies, and the sticks crooked as they
tried to give the ball a fillip outside. But Diamond, “half-back” for
Springbrook, saw his opportunity, made a rush and a hard
backhander on the near side, and out shot the little white sphere on
its way to glory.
Merriwell was on it, as if he had been waiting for that very play.
His stick, which he had selected with great care, seemed to swing
free for a moment from the strap about his wrist, then the malacca
did its work.
“Hooray!” cried Ephraim Gallup. “It’s a goal sure! Hooray!”
“Yaw!” screamed Hans, “id peen a dandy!”
“Outside! outside!”
“Who says outside?” snapped Rattleton. “The referee? I know
better! It’s a goal sure!”
“Outside, I tell you!” came the voice of the referee, and the
game stopped.
It was a disappointment for Frank’s friends, for they had felt
certain he would make a goal, but the fairness of the referee was
not to be questioned.
The captain of the Meadowfairs had the strike-off, and the
Springbrooks fell back from the line.
But Stone was cunning, and he gave the ball a clever sweep to
right field, and away from his goal. His “forward” knew the trick, and
Liner was keyed up for a race to boundary.
But Frank had seen that trick before, and he resolved to find out
what sort of stuff Coffin Head was made of, now that there was a
good opportunity. The pony had handled himself with such ease and
skill, for all of his awkward and homely appearance, that Merry was
more than delighted, and now came the supreme test.
Liner flew out after the ball, upon which Fenton’s eyes were
steadily fastened. But Coffin Head was in the race, and the old crock
didn’t do a thing but spread himself. The way he tore along over the
ground amazed everybody who saw it. It seemed that the old horse
had renewed his youth and was out for blood. He made the run of
his life to get his rider on that ball. Like a meteor he flew across the
green, and Liner was fairly beaten, causing Frank Merriwell’s friends
and admirers to rise up and shout with astonishment and delight.
The check was too sudden, however, and the old pony slid on
his haunches. Then up rushed a mass of men and ponies, making
for a moment a wild mêlée.
Kimball got a crack at the ball, but it glanced off the ribs of
Harden’s pony, causing the animal to wince and swerve.
That let in Merriwell, who had brought Coffin Head about, and
he made a skillful stroke. As he did so, he felt something whistle
past his head, and realized that he had narrowly escaped a blow
that must have spoiled the effectiveness of his work.
Frank did not take his eyes off the ball; but, nevertheless, he
saw it was Fenton who had attempted the foul stroke, being unable
to reach the ball himself.
Diamond went down on the sphere with a rush, and carried it
along toward the enemy’s posts. With a clean lead at the proper
moment, the Virginian, who had already showed himself a perfect
horseman and perfect polo player, sent the white ball sailing through
the timber, and Springbrook had made the first goal.
CHAPTER XXV—THE END OF THE
GAME

Diamond was heartily congratulated, and his dark face flushed with
pleasure over his success.
“But I didn’t do it alone,” he declared. “Merriwell deserves as
much or more credit, for he sent it out of the bunch, and gave me
my chance at it.”
“You fellows must have played together a great deal,” said
Harden. “You work together perfectly.”
Frank laughed.
“We never played together in a game before,” he said. “I didn’t
know Diamond played polo till a short time ago.”
“It’s remarkable!” smiled St. Ives, who was delighted over the
work of his team. “And old Coffin Head is right in the game.”
“You bet!” cried Merry. “He is an old dandy! I wouldn’t swap him
for Liner now!”
“But he has not done such work this season. He is in his old-
time trim, and I believe two-thirds of it comes from his rider.”
Diamond touched Frank’s arm, and drew him aside.
“Say, Frank,” he whispered, “do you know you came near
getting a crack over the head?”
“Sure,” nodded our hero.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like