100% found this document useful (3 votes)
14 views

(Ebook) Beginning Robotics with Raspberry Pi and Arduino: Using Python and OpenCV - PDFDrive.com by Jeff Cicolani - The ebook in PDF/DOCX format is ready for download now

The document promotes the ebook 'Beginning Robotics with Raspberry Pi and Arduino: Using Python and OpenCV' by Jeff Cicolani, which provides a comprehensive introduction to robotics for beginners. It covers essential topics such as programming in Python, interfacing Raspberry Pi with Arduino, and building a robot, along with practical projects and resources. The ebook is available for instant download in various formats on ebooknice.com.

Uploaded by

tsueiahene
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
14 views

(Ebook) Beginning Robotics with Raspberry Pi and Arduino: Using Python and OpenCV - PDFDrive.com by Jeff Cicolani - The ebook in PDF/DOCX format is ready for download now

The document promotes the ebook 'Beginning Robotics with Raspberry Pi and Arduino: Using Python and OpenCV' by Jeff Cicolani, which provides a comprehensive introduction to robotics for beginners. It covers essential topics such as programming in Python, interfacing Raspberry Pi with Arduino, and building a robot, along with practical projects and resources. The ebook is available for instant download in various formats on ebooknice.com.

Uploaded by

tsueiahene
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

Instant Ebook Access, One Click Away – Begin at ebooknice.

com

(Ebook) Beginning Robotics with Raspberry Pi and


Arduino: Using Python and OpenCV - PDFDrive.com by
Jeff Cicolani

https://ebooknice.com/product/beginning-robotics-with-
raspberry-pi-and-arduino-using-python-and-opencv-pdfdrive-
com-50195874

OR CLICK BUTTON

DOWLOAD EBOOK

Get Instant Ebook Downloads – Browse at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Beginning Robotics with Raspberry Pi and Arduino: Using Python and OpenCV by
Jeff Cicolani ISBN 9781484234617, 1484234618

https://ebooknice.com/product/beginning-robotics-with-raspberry-pi-and-arduino-
using-python-and-opencv-7008200

ebooknice.com

(Ebook) Beginning Robotics with Raspberry Pi and Arduino: Using Python and OpenCV by
Jeff Cicolani ISBN 9781484268919, 1484268911

https://ebooknice.com/product/beginning-robotics-with-raspberry-pi-and-arduino-
using-python-and-opencv-23497110

ebooknice.com

(Ebook) Beginning Robotics with Raspberry Pi and Arduino: Using Python and OpenCV by
Jeff Cicolani ISBN 9781484268902, 1484268903

https://ebooknice.com/product/beginning-robotics-with-raspberry-pi-and-arduino-
using-python-and-opencv-23518014

ebooknice.com

(Ebook) Beginning Sensor Networks with XBee, Raspberry Pi, and Arduino: Sensing the
World with Python and MicroPython by Charles Bell ISBN 9781484257951, 1484257952

https://ebooknice.com/product/beginning-sensor-networks-with-xbee-raspberry-pi-
and-arduino-sensing-the-world-with-python-and-micropython-11176498

ebooknice.com
(Ebook) Beginning Sensor Networks with XBee, Raspberry Pi, and Arduino, Second
Edition: Sensing the World with Python and MicroPython by Charles Bell ISBN
9781484257968, 1484257960

https://ebooknice.com/product/beginning-sensor-networks-with-xbee-raspberry-pi-
and-arduino-second-edition-sensing-the-world-with-python-and-
micropython-50195862

ebooknice.com

(Ebook) IoT Machine Learning Applications in Telecom, Energy, and Agriculture: With
Raspberry Pi and Arduino Using Python by Puneet Mathur ISBN 9781484255490,
1484255496

https://ebooknice.com/product/iot-machine-learning-applications-in-telecom-
energy-and-agriculture-with-raspberry-pi-and-arduino-using-python-50195440

ebooknice.com

(Ebook) Embedded Robotics: Mobile Robots with Raspberry Pi and Arduino, 4th Edition
by Thomas Bräunl ISBN 9789811608032, 9811608032

https://ebooknice.com/product/embedded-robotics-mobile-robots-with-raspberry-pi-
and-arduino-4th-edition-43787318

ebooknice.com

(Ebook) Industrial Vision Systems with Raspberry Pi: Build and Design Vision
products Using Python and OpenCV by Mohaideen A, Dr. Kadhar, G. Anand ISBN
9798868800962, 8868800969

https://ebooknice.com/product/industrial-vision-systems-with-raspberry-pi-build-
and-design-vision-products-using-python-and-opencv-58824382

ebooknice.com

(Ebook) Embedded Robotics: From Mobile Robots to Autonomous Vehicles with Raspberry
Pi and Arduino, 4th Edition by Thomas Bräunl ISBN 9789811608032, 9811608032

https://ebooknice.com/product/embedded-robotics-from-mobile-robots-to-
autonomous-vehicles-with-raspberry-pi-and-arduino-4th-edition-42256834

ebooknice.com
Jeff Cicolani

Beginning Robotics with Raspberry Pi


and Arduino
Using Python and OpenCV
Jeff Cicolani
Pflugerville, Texas, USA

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-3461-7 . For more detailed information, please
visit http://www.apress.com/source-code .

ISBN 978-1-4842-3461-7 e-ISBN 978-1-4842-3462-4


https://doi.org/10.1007/978-1-4842-3462-4

Library of Congress Control Number: 2018937971

© Jeff Cicolani 2018

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.
the material contained herein.

Printed on acid-free paper

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 Martha, my beautiful and patient wife, for putting up with random robot
parts strewn about the house, pretty much constantly
Introduction
Robotics does not have to be difficult. In this book, I introduce you to the field
of robotics. The journey will be challenging; it’s intended to be. But by the end
of the book, you will have hands-on exposure to many of the fundamental—and
not so fundamental—aspects of robotics. You will work with hardware,
assemble and solder a circuit board, write code in two programming languages,
install and configure a Linux environment, and work with computer vision.
Everything else you do with robots will be an extension of the lessons learned in
this book.
Who This book Is For
This book is for those who are new to electronics and IoT; those who have never
used a Raspberry Pi or Arduino separately, let alone together.
This book is for the hobbyist who is interested in learning a little more about
working with robots. Perhaps you’ve built a few circuits with an Arduino or a
custom home entertainment system with a Raspberry Pi, and now you are
curious about what goes into building a robot. You will learn how these two
devices work together to provide very powerful capabilities.
This book is for the entrepreneur who needs to learn more about technology;
someone who doesn’t necessarily have the time to read through many different
books on Arduino, Raspberry Pi, electronics, or programming; someone who is
looking for a broad yet condensed introduction to some of the fundamentals.
This book is also for the student who wants to take their robot-building
experience beyond bricks and puzzle-piece programming; someone who wants
to work with hardware and software that more closely resembles what they
might see in college or in the professional world.
No assumptions are made about experience or background in technology. As
you go through the chapters, you may find parts that you are already familiar
with, and you can skip ahead. But if you are new to these topics, I try to provide
you with a quick but easy introduction.
Chapter Overview
You start by learning about the Raspberry Pi and how to work with it. You
download and install the Raspbian operating system, and then configure the Pi
for our project. The goal is to set up your system to be able to easily access your
robot and write your code directly on it.
Once you are able to access your Pi remotely, in Chapter 3 , you delve into
programming with Python. I’ll show you how to write simple programs on the
Raspberry Pi. I also take you beyond the basics and cover some intermediate
topics, such as modules and classes. This is one of the longest chapters since
there is a lot of material to cover.
From there, you learn how to interface the Raspberry Pi with external
electronics, such as sensors and LEDs, through the Pi’s GPIO header. Chapter 4
discusses the different ways of addressing the pins on the header, some of the
functionality exposed through the header, and how to use an ultrasonic
rangefinder to detect objects. This gets you ready for the next chapter, which
introduces the Arduino.
In Chapter 5 , you connect the Arduino to the Raspberry Pi. I discuss some
of the reasons you want to do this. I show you how to work with the Arduino
IDE to write programs. I cover serial communication between the two boards
and how to pass information back and forth between them. We do this using the
same ultrasonic rangefinder used in the previous chapter.
Chapter 6 has you turning motors with your Raspberry Pi. You use a special
board called a hat , or plate , to control the motors. This is where I introduce
another skill that you will inevitably need in robotics: soldering. The header and
terminals need to be soldered on to the board that was selected for this purpose.
The nice thing about soldering headers and terminal blocks is that it’s hard to
damage anything, and you will get plenty of practice.
Chapter 7 is where we bring it all together. You build the robot, and I discuss
some of the physical characteristics of robotics. I cover some of the design
considerations that you will need to keep in mind when you design your own
chassis. Although I am listing a specific chassis kit for this project, you do not
need to use the same one. In fact, I encourage you to explore other options to
find the one that is right for you.
In Chapter 8 , I introduce another type of sensor—the IR sensor, and I show
you how to use a very common control algorithm called a PID controller. I talk
about the various types of IR sensors and where you want to use them. (The
chapter on PID control discusses what it is and why you want to use it.) Chapter
9 is about computer vision, where you see the true power of the Raspberry Pi. In
this chapter, I cover an open source package called OpenCV. By the end of
Chapter 9 , your little robot will be chasing a ball around the table.
I leave you with some parting thoughts in Chapter 10 . I provide a few tips
that I picked up, and I give you a glimpse into my workflow and tools. After
that, you will be ready to begin your own adventures in robotics.
Table of Contents
Chapter 1: Introduction to Robotics

Robotics Basics

Linux and Robotics

Sensors and GPIO

Motion and Control

Raspberry Pi and Arduino

Project Overview

The Robot

Bill of Materials (BOM)

Summary

Chapter 2: An Introduction to Raspberry Pi

Downloading and Installing Raspbian

Raspbian with OpenCV

The “Hard” Way

The “Easy” Way

Connecting Raspberry Pi

Configuring Your Pi

Using raspi-config

Users
Connecting to a Wireless Network

Going Headless

Remote Access

Summary

Chapter 3: A Crash Course in Python

Python Overview

Downloading and Installing Python

Python Tools

The Python Shell

The Python Editor

The Zen of Python

Writing and Running a Python Program

Hello World

Basic Structure

Running a Program

Programming in Python

Variables

Data Types

A Final Note on Variables

Control Structures

Functions
Adding Functionality through Modules

Classes

Styling

Summary

Chapter 4: Raspberry Pi GPIO

Raspberry Pi GPIO

Pin Numbering

Connecting to the Raspberry Pi

Limitations of Raspberry Pi’s GPIO

Accessing GPIO with Python

Simple Output: LED Example

Simple Input

Summary

Chapter 5: Raspberry Pi and Arduino

Raspberry Pi’s GPIO in Review

Real-Time or Near Real-Time Processing

Analog Input

Analog Output

Arduino to the Rescue

Using Arduino

Installing the Arduino IDE


Connecting an Arduino

Programming Arduino

Sketches

A Brief Introduction to the Arduino Language

Including Other Files

Variables and Data Types

Control Structures

Working with Pins

Objects and Classes

Serial

Arduino to Pi and Back Again

Pinguino

Setting up the Circuit

Summary

Chapter 6: Driving Motors

Motors & Drivers

Types of Motors

Motor Properties

Motor Drivers

Working with Motor Controllers

Adafruit DC & Stepper Motor HAT


L298N Generic Motor Driver

Summary

Chapter 7: Assembling the Robot

Assembling the Chassis

Choosing a Material

The Whippersnapper

Mounting the Electronics

Wiring

Mounting Sensors

The Finished Robot

Making the Robot Mobile

Summary

Chapter 8: Working with Infrared Sensors

Infrared Sensors

Types of IR Sensors

Working with IR Sensors

Connecting an IR Sensor

Mounting the IR Sensors

The Code

Understanding PID Control

Control Loops
Implementing the PID Controller

Summary

Chapter 9: An Introduction to OpenCV

Computer Vision

OpenCV

Selecting a Camera

Installing the Camera

OpenCV Basics

Working with Images

Capturing Images

Image Transformations

Working with Color

Blobs and Blob Detection

Ball-Chasing Bot

Summary

Chapter 10: Conclusion

Types of Robotics

Tools

Software

Hardware

Summary
Index
About the Author and About the Technical Reviewer
About the Author
Jeff Cicolani
currently lives in the Austin, Texas, area with his wife,
two dogs, and dozen or so robots. He is currently
working as an embedded systems engineer, building
robotic and automated platforms for an AI (artificial
intelligence) company in Austin. His journey to
robotics was circuitous, taking him through an odd
career path that included systems analysis and design
and database programming. In 2012, he joined The
Robot Group in Austin, where he joined a group of
robotics enthusiasts and began building robots as a
hobby. In 2016, he became president of The Robot
Group. In this role, he leads the group in their mission to promote STEM
(science, technology, engineering, and mathematics) education through robotics.
He is currently working to develop a better understanding of advanced robotics
through ROS (the robot operating system) and machine learning.

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.
His 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, and more.
He currently works as a chief information security
officer (CISO) for Cargotec Oyj. He worked as
visiting lecturer and supervisor for exercises at the
Networking Laboratory of the Helsinki University of
Technology (Aalto University). He holds four
international patents (PKI, SIP, SAML, and Proxy
areas).
© Jeff Cicolani 2018
Jeff Cicolani, Beginning Robotics with Raspberry Pi and Arduino, https://doi.org/10.1007/978-1-4842-
3462-4_1

1. Introduction to Robotics
Jeff Cicolani1
(1) Pflugerville, Texas, USA

The word robotics can mean a lot of things. For some people, it is anything that
moves by itself; kinetic art is robotics. To other people, robotics means
something that is mobile or something that can move itself from place to place.
There is actually a field called mobile robotics ; automatic vacuum cleaners,
such as a Roomba or a Neato, fall into this category. To me robotics falls
somewhere in between kinetic art and mobile robotics.
A robot is technology that applies logic to perform a task in an automated
manner. This is a fairly broad definition, but robotics is a fairly broad field. It
can cover everything from a child’s toy to the automatic parallel parking
capabilities in some automobiles. We build a small mobile robot in this book.
Many of the principals that you are exposed to in this book are easily
transferable to other areas. In fact, we will go through the entire process of
building a robot from beginning to end. A little later in this chapter, I go over the
project that we will build. At that time, I will provide a list of the parts used in in
this book. These parts include sensors, drivers, motors, and so forth. You are
welcome to use whatever you have on hand because, for the most part,
everything we go through in this book can be applied to other projects.

Robotics Basics
I like to tell people who are new to robotics, or are just robotics curious, is that a
robot consists of three elements .
The ability to gather data
The ability to process, or do something with the gathered data
The ability to interact with the environment
In the following chapters, we apply this principal to build a small mobile
robot. We will use ultrasonic rangefinders and infrared sensors to gather data
about the environment. Specifically, we will identify when there is an object to
be avoided, when we are about to drive off the edge of a table, and the contrast
between the table and the line that we will follow. Once we have this data, we
will apply logic to determine the appropriate response.
We will use Python in a Linux environment to process the information and
send commands to our motors. I chose Python as the programming language
because it is easy to learn, and you don’t have to have a complex development
environment to build some pretty complex applications.
Our interaction with the environment will be simply to control the speed and
direction of motors. This will allow our robot to move about freely on the table
or floor. There really isn’t much to driving a motor. We will look at two ways of
doing it: with a motor driver made for the Raspberry Pi and with a common
motor controller.
This book is intended to be challenging. I cover some pretty complex
material and I do it quickly. There is no way that I can provide detailed coverage
on any of these topics, but I hope to get you to a functional robot by the end of
the book. In each chapter, I try to provide you with more resources to follow up
on the topics discussed. You will struggle at times; I did and I frequently still do.
Not everyone will be interested in all the subjects. The expectation is that
you will expand on the areas that interest you the most outside of this book.
Persistence pays off.
At the end of the book, I add a little more challenge. In Chapter 9, we begin
leveraging the real power of the Raspberry Pi. We look at computer vision.
Specifically, we look at an open source package called OpenCV (CV stands for
computer vision). It is a common and very powerful collection of utilities that
make working with images and video streams very easy. It’s also a six-hour
build on the most recent version of the Raspberry Pi. To make things a little
easier and a lot less time-consuming, I have available for download a version of
the operating system with OpenCV already installed. I discuss this more in
Chapter 2.

Linux and Robotics


Linux is a Unix-based operating system. It is very popular with programmers
and computer scientists because it’s simple and straightforward. They seem to
enjoy the text-based interface of the terminal. Yet, for many others, including
me, Linux can be very challenging. So, why in the world would I choose this
environment for an introduction-to-robotics book? The answer to that question is
threefold.
First, when you work with robotics, you eventually have to confront Linux.
That’s just a fact. You can do a lot without ever typing a single sudo command,
but you will have limited capabilities. The sudo command stands for super user
do in Linux. This tells the operating system that you are about to perform a
protected function that requires more than general user access. You will learn
more about this when we begin working with the Raspberry Pi.
Second, Linux is challenging. As I stated before, this book will challenge
you. If you have worked in Linux before, then this reason doesn’t apply to you.
However, if you are new to Linux, the Raspberry Pi, or working in a command
line, then some of the things that we do will be challenging. And that’s good.
You’re learning something new and it should be a challenge.
Third, and this is by far the most important, the Raspberry Pi uses Linux .
Yes, you can install other operating systems on the Pi, but it was designed and
intended to use Linux. In fact, the Raspberry Pi has its own flavor of Linux
called Raspbian . This is the recommended operating system, so it is what we’ll
use. One of the nice things about using a prebuilt operating system, besides its
ease of use, is many of the tools are already installed and ready to go.
Since we are using Linux, we will use command-line instructions
extensively. This is where most new users have problems. Command-line code
is entered via a terminal. Raspbian has a Windows-style interface that we will
use, but much of it uses the terminal. A terminal window is available in the
graphical user interface (GUI) , so we will use that. However, when we set up
the Pi, we will set it up to boot into terminal mode by default. Getting to the GUI
is only a simple startx command. All of this is covered in Chapter 2.

Sensors and GPIO


GPIO stands for general-purpose input/output. It represents all the various
connections to devices. The Raspberry Pi has a lot of GPIO options: HDMI,
USB, audio, and so forth. However, when I talk about GPIO in this book, I’m
generally referring to the 40-pin GPIO header. This header provides direct
access to most of the board’s functionality. I discuss this in Chapter 2.
Arduino also has GPIO. In fact, one could argue that Arduino is all GPIO
and nothing else. This isn’t far from the truth given that all the other connections
are there to allow you to communicate with and power the AVR chip at the heart
are there to allow you to communicate with and power the AVR chip at the heart
of the Arduino.
All of these headers and GPIO connections are there so we can access
sensors outside the boards themselves. A sensor is a device that gathers data.
There are many different types of sensors, and all serve a purpose. Sensors can
be used for detecting light levels, the range to an object, temperature, speed, and
so forth. In particular, we will use GPIO headers with an ultrasonic rangefinder
and an IR detector.

Motion and Control


One thing that most definitions of a robot have in common is that it needs to be
able to move. Sure, you can have a robot that doesn’t actually move, but this
type of device generally falls under the moniker of IoT, the Internet of Things.
There are many ways to add motion to your project. The most common is the
use of motors. But you can also use solenoids, air, or water pressure. I discuss
motors more in Chapter 6.
Although it is possible to drive a motor directly off a Raspberry Pi or an
Arduino board, it is strongly discouraged. Motors tend to draw more current than
the processors on the boards can handle. Instead, it is recommended that you use
a motor controller. Like motors, motor controllers come in many forms. The
motor control board that we will use is accessed through the Raspberry Pi’s
header. I also discuss how to drive motors with an L298N dual motor controller.

Raspberry Pi and Arduino


We will use a Raspberry Pi (see Figure 1-1) in conjunction with an Arduino (see
Figure 1-2) as our robot’s processing platform.
Figure 1-1 Raspberry Pi 3 B+

Figure 1-2 Arduino Uno

The Raspberry Pi is a single board computer that is about the size of a credit
card. Despite its small size, it is a very capable device. The Pi runs a version of
Linux that was customized to work on the ARM processor that drives it. This
puts a lot of functionality into a small device that is easy to embed into things
like robots. But, although it is a great computer, there are a few places where it
does not excel. One area is interfacing with external devices. It can work with
sensors and external devices, but the Arduino does this much better.
Arduino is another small processing device that is readily available and easy
to use. Unlike a Raspberry Pi, however, it does not have the capacity for a full
operating system. Rather than running a microprocessor like the ARM, it uses a
different type of chip called a microcontroller . The difference is that a
microcontroller is specifically designed to interact with sensors, motors, lights,
and all kinds of devices. It directly interacts with these external devices. The Pi
works through many layers of processing before it ever reaches the pins that a
device is connected to.
By combining the Raspberry Pi and the Arduino, we are able to leverage
what each does best. The Raspberry Pi offers the high-level processing power of
a full computer. Arduino provides the raw control over external devices. The Pi
allows us to process a video stream from a simple USB camera; whereas the
Arduino allows us to gather the information from the various sensors, and apply
logic to make sense of all that data, and then return concise findings to the Pi.
You will learn more about the Raspberry Pi in Chapter 2. Later on, you will
connect an Arduino to the Pi and learn about programming it, as well as how to
pass information back and forth between the Arduino and the Pi.

Project Overview
In this book, we will build a small mobile robot. The robot is designed to
demonstrate the lessons that you learn in each chapter. However, before we can
actually build the robot, we need to cover a lot of material and lay the foundation
for future lessons.

The Robot
The robot that we will build is a small two-or four-wheeled autonomous rover. It
will be able to detect obstacles and the edge of a table, and to follow a line. The
chassis that I selected is a four-wheeled robot, but there are other designs
suitable for this project (see Figures 1-3 and 1-4).
Figure 1-3 The front of our robot shows the ultrasonic sensors and Pi T Cobbler on a breadboard

Figure 1-4 The back of our robot shows the Raspberry Pi and motor control board

Although I provide a list of the parts that I used for the project, you are
welcome to use whatever parts you wish. The important thing is that they behave
in a similar manner as those I have listed.

Bill of Materials (BOM)


For the most part, I tried to keep the list of materials as generic as possible.
There are a couple of items that are vendor specific. I chose them because they
provide a lot of functionality and convenience. The DC & Stepper motor
controller and the Pi T-Cobbler are from an online retailer called Adafruit ,
which is a great resource for parts, tutorials, and inspiration. The chassis kit is
from an online retailer called ServoCity , which produces many mechanical parts
for robotics.
The following are the specialty parts (shown in Figure 1-5) that we use in
this book:
Runt Rover Junior robot chassis from ServoCity.com
Adafruit DC & Stepper Motor HAT for Raspberry Pi – Mini Kit PID:
2348
GPIO Stacking Header for Pi A+/B+/Pi 2/Pi 3 – Extra-long 2×20 Pins
PID: 2223 (allows the use of additional plates and the Cobbler to attach to
the breadboard)
Assembled Pi T-Cobbler Plus – GPIO Breakout – Pi A+, B+, Pi 2, Pi 3,
Zero PID: 2028

Figure 1-5 Runt Rover chassis parts and the Pi T Cobbler, ribbon cable, motor control hat, and extended
header

The following parts (shown in Figure 1-6) are fairly generic and can be
purchased from most vendors:
Raspberry Pi 3 – Model B – ARMv8 with 1G RAM
Arduino Uno
4 × AA battery holder with on/off switch (powers the motors)
USB Battery Pack – 2200 mAh Capacity – 5V 1A Output PID: 1959
(powers the Raspberry Pi)
Half-size breadboard
Ultrasonic sensors – HC-SR04
You may want to get a few of these. As you will discover, ultrasonic
sensors are unreliable at angles, and it is good to have an array of them. I
use at least three on most of my projects.
A collection of jumper wires (see Figure 1-7) You need both male-to-male
jumpers and male-to-female jumpers. It is a good idea to get them in a
number of colors. Black and red are used for powering your devices. A
collection of other colors helps you make sense of your circuits.
Fortunately, you can get jumpers of all types made out of a multicolored
ribbon cable.
USB cables for your Arduino
A micro USB cable for your Raspberry Pi
A common USB phone charger, preferably one for a modern smartphone or
tablet that can provide 2 amps of power
An HDMI TV or computer monitor Most computer monitors do not have
HDMI ports on them. You can get HDMI-to-DVI converters that allow you
to use your existing monitor, however.
A USB keyboard and mouse (I like the Logitech K400 wireless keyboard
and touchpad combination, but there are countless options out there)
A network-connected computer
Wi-Fi or Ethernet cable for the Pi
Figure 1-6 Common parts: Raspberry Pi, Arduino Uno, ultrasonic sensor, battery holder, and
breadboard

Figure 1-7 Jumpers in ribbon cable form. Pull off what you need

You don’t need to get fancy with the monitor and keyboard. Once you read
Chapter 2, where we install and configure the Raspberry Pi , you no longer need
them. I have a couple of the wireless keyboards because I usually have several
projects going at once. For a monitor, I simply use one of my computer monitors
with an HDMI-to-DVI adapter.
If you are not using a chassis kit with motors and wheels included, you also
need the following parts (see Figure 1-8):
Hobby gearmotor – 200 RPM (pair)
Wheel – 65mm (rubber tire, pair)

Figure 1-8 DC geared motor and wheels

If you do not want to use the Adafruit Motor and Stepper Hat, you can also use
virtually any motor controller, although each one has a different interface and
code. A common and fairly popular option is the L298N Dual Motor Controller
(see Figure 1-9).
Figure 1-9 The L298N dual motor controller module comes in numerous varieties, but essentially work
the same

There are a few other supplies that I keep around because they are used in
virtually every project . In Chapter 7, we assemble the robot; you’ll need also
double-sided foam mounting tape, 4-inch zip ties, and self-adhesive Velcro. As
you continue in robotics, you’ll find yourself turning to these items a lot. In fact,
you may want to stock up on various sizes of zip ties. Trust me.

Summary
Getting started in robotics does not need to be difficult. It is challenging,
however. This book is an introduction to a few of the skills that you need to
develop if you are to succeed in this field. The robot that we build introduces
you to the Raspberry Pi, Linux, Arduino, sensors, and computer vision. These
skills easily scale into larger robot and other similar projects.
© Jeff Cicolani 2018
Jeff Cicolani, Beginning Robotics with Raspberry Pi and Arduino, https://doi.org/10.1007/978-1-4842-
3462-4_2

2. An Introduction to Raspberry Pi
Jeff Cicolani1
(1) Pflugerville, Texas, USA

The purpose of this book is to challenge you to build a simple robot that will be
expanded over time. This book is intended to be difficult; however, it isn’t too
difficult or unnecessarily complicated. You’ll experience plenty of
complications along the way, but the installation of the operating system on your
Raspberry Pi does not need to be one of them.

Downloading and Installing Raspbian


There are, essentially, two methods of installing the operating system (OS) on
your Pi.
The first involves downloading the latest Raspbian image, writing it to an SD
card, and going from there. This method requires the installation of a third-party
software package that writes a bootable image on an SD card. The advantage is
that it takes less room on your SD card. If you’re using a minimum 8GB SD
card, this may be helpful; if you went bigger, then this consideration is moot.
Whereas the direct installation is not all that complicated (rather easy
actually), there’s an easier way that doesn’t involve installing additional
software on your system. NOOBS (New Out Of the Box Software) is designed
to make the installation and configuration of your Raspberry Pi easier. It allows
you to select from multiple operating systems and simply install. However, the
NOOBS package remains on the SD card and eats up valuable space. It does
allow you to go back and repair your OS or change the OS completely, but that
can be handled manually quite easily.
In the end, the choice is yours. I’ll go over both options so that you can
choose whichever installation path works best for you. No matter which option
you choose, your journey begins at the Raspbian download page at
www.raspberrypi.org/downloads/ (see Figure 2-1).

Figure 2-1 Raspbian download screen

Raspbian with OpenCV


Toward the end of this book, we will work with computer vision to show you
why you should use a Raspberry Pi rather than a less capable platform. In order
to do that, however, you need to install OpenCV on your Pi. Unfortunately, there
is no simple OpenCV installer for the Raspberry Pi. Because the Pi runs on an
ARM processor, the package has to be compiled from source code, which is a
six-hour process.
To make things easier for you, I precompiled OpenCV in Raspbian Jesse and
created a downloadable image at
https://github.com/jcicolani/Jesse-OpenCV .
You still need to walk through the installation and configuration process to
customize the installation. The image includes the default settings that you need
to change (with a few exceptions that were necessary to make the build).

The “Hard” Way


The more difficult method installs the Raspbian OS image directly on the SD
card—ready to boot up. This is the method that I use because it really isn’t any
more complicated than the previous method, and it allows me to use versions
that are not available through NOOBS.
You have two options for your Raspbian installation. Jessie is the most
recent stable version of the operating system; it is what we’ll be using. The first
option is Raspbian Jessie with PIXEL—their new, optimized GUI. It is a 1.5GB
download, and it is a 4.2GB image once it’s been decompressed. The second
option is Raspbian Jessie Lite, a minimal image that is a much smaller 300MB
download (1.4GB after decompression). However, minimal means no GUI, so
everything is done via the command line. If you’re a fan of headless Linux, then
this is the option for you. We will use the larger install with PIXEL .
If you have a BitTorrent client installed, click Download Torrent. This is
much faster than downloading the .zip file.

1. Navigate to www.raspberrypi.org/downloads/ .

2. Click the Raspbian image.

3. Select the Raspbian flavor that you want to install.

4. Once the download is complete, decompress the file somewhere that you’ll
easily find it.

5. Download and install Win32 Disk Imager. This allows you to write the
image file that you just downloaded to the micro SD card. You can get it at
https://sourceforge.net/projects/win32diskimager/ .

6. Optionally, you may also want to download SDFormatter to make sure that
your SD card is properly prepared. You can get it at
www.sdcard.org/downloads/formatter_4/ .

7. Insert your micro SD card into the card reader connected to your computer.
8. If you have downloaded and installed SDFormatter, open it. You should
see a dialog box similar to the one shown in Figure 2-2.

Figure 2-2 SD Card Formatter

9. Make sure that you select the drive representing your SD card. You’re
about to format it, so if you select the wrong thing, it will wipe out
whatever you have on that drive. The tool usually selects the right one by
default, but double check. It would be wise to disconnect any other
external storage devices.

10. Make sure that Format size adjustment is set to On. This removes any
other partitions on the card and uses the whole thing. Leave all the other
settings at the default.
11. Click Start. When the process finishes, you’re ready to install the OS.

12. To flash the image to the SD card, open Win32 Disk Imager .

13. In the image file field, select the Raspbian image that you downloaded.
You can click the file folder icon to navigate to it.

14. Make sure that your SD card is selected in the device drop-down box.
Again, selecting the wrong device can lead to a world of hurt; so pay
attention.

15. Click Write.

16. Once the process has completed, remove the card from your card reader.

17. Insert the card into the micro SD card reader on the Raspberry Pi.
That sounds lengthy, but it is remarkably fast and easy to do. Next, let’s walk
through the NOOBS installation process.

The “Easy” Way


I call this method the “easy” way, although the hard way is actually pretty easy.
What makes this easy is that you don’t have to write the image directly. You will
probably want to format the card, but if it’s a new card, that may not be
necessary. To make it even easier, if you bought your Pi as part of a starter kit, it
probably came with NOOBS already installed on a micro SD card. If this is the
case, you can skip the first few steps.
You have two options: NOOBS and NOOBS Lite. NOOBS includes the
Raspbian image with the download, so you won’t have to connect to the network
to download anything once it’s on your SD card. You have the option of
selecting another OS, if you so choose, but you’ll need to have your Pi
connected to the network for NOOBS to download it. NOOBS Lite does not
include the full Raspbian image. For our purposes, select the standard NOOBS
install.

1. Click the NOOBS image on the Downloads page.


2. Select your NOOBS flavor. If you have a BitTorrent client installed, click
Download Torrent . This is much faster than downloading the .zip file.

3. Optionally, you may also want to download SDFormatter to make sure that
your SD card is properly prepared. You can get it at
www.sdcard.org/downloads/formatter_4/ .

4. If you downloaded and installed SDFormatter, open it.

5. Make sure that you select the drive representing your SD card. You’re
about to format it, so if you select the wrong thing, it will wipe out
whatever you have on that drive. The tool usually selects the right one by
default, but double check. It would be wise to disconnect any other
external storage devices.

6. Make sure that Format size adjustment is set to On. This removes any
other partitions on the card and uses the whole thing. Leave all the other
settings at the default.

7. Click Start. When the process has finished, you’re ready to install the OS.

8. Unzip the NOOBS file directly onto the SD card.

9. Remove the card from your card reader.

10. Insert the card into the micro SD card reader on the Raspberry Pi.

11. At this point, you need to hookup your Pi to continue. So, jump forward to
the “Connecting Raspberry Pi” section in this chapter. Once you’ve
complete those steps, come back to this section to continue the setup.

12. When you connect power to the Raspberry Pi, it boots up to the NOOBS
installation screen. If you used NOOBS Lite, you have your choice of OS.
If you used the standard NOOBS download, your only option is Raspbian
(which is OK because that’s what we’re using).
13. Click Raspbian to make sure that it’s selected. Also make sure that you
select the correct language at the bottom of the screen (in my case, it is
English (US)).

14. Click the Install button at the top of the screen.


The installation could take a little while, so go ahead and grab a cup of
coffee.

Connecting Raspberry Pi
Now that your micro SD card is ready to go, you need to hook up your
Raspberry Pi. If you’re using an original, first generation Pi, this is a little more
complicated.
Every model after the original, however, includes multiple USB ports and an
HDMI connector to make things easier. Hooking up the Pi is very simple.

1. Connect your monitor via the HDMI cable. If you are using a small
television that is outfitted with component hookups rather than HDMI, the
audio jack on the Pi is a four-pole component jack. You need an RCA-to-
3.5mm converter, usually in cable form, to do this.

2. Connect your keyboard and mouse to the USB ports. I use a wireless
keyboard/touchpad combination because it’s compact and portable.

3. Make sure that your micro SD card with Raspbian or NOOBS is installed in
the micro SD port on the Pi. Essentially, this is the hard drive for your small
computer, so it has to be in the right place. It will not read the OS through an
SD card reader connected to one of the USB ports.

4. If you are using an Ethernet cable, connect it to the Ethernet port . You may
also plug a Wi-Fi dongle to the USB port. If you are using a Pi 3, as I am,
Wi-Fi is built in.

5. Connect the 5V power to the micro USB port. This port is only for power.
You cannot access the board via USB.
That’s it. Your Raspberry Pi should look similar to what’s shown in Figure
2-3. The Pi should be booting on your monitor. If you are installing NOOBS, go
back to step 10 of the Noobian installation to complete the installation process .

Figure 2-3 Raspberry Pi connections

Now that you’re connected and booted up, you need to log in. The following
are the default credentials for a Raspbian installation:
Username: pi
Password: raspberry
Of course, the default username and password are never secure. So, to keep your
cybersecurity friends from running away with your robot, one of the first things
we’re going to do is change the password. Later in the configuration, we will
change the default username.

Configuring Your Pi
Now that we’ve taken care of the initial installation, we’re going to move on to a
little customization. The Pi has several features that you can enable, depending
on your particular use. Initially, they’re not enabled to reduce some of the
overhead needed to run the OS. The configuration settings that we’re going to
implement are for security and convenience.

Using raspi-config
Using raspi-config
To make customizations, the good folks at the Raspberry Pi Foundation have
included a utility called raspi-config. A command-line terminal is necessary to
use it. A single command is entered right now, but as we move forward in the
workshops, you’ll become much more familiar with the terminal window. If
you’re new to Linux (on which Raspbian is based), this can be a little
intimidating. It doesn’t need to be, and I’ll do my best to ease you into it. But
you will have to learn your way around it.
You can find more information about the raspi-config utility at
www.raspberrypi.org/documentation/configuration/raspi-
config.md .
At this point, you should have already booted into your Raspberry Pi. If not,
do so now.
We will be doing several things to configure the Pi, starting with expanding
the file system to take advantage of the entire SD card. By default, Raspbian
doesn’t use the entire SD card, so we’ll want to tell it to. If you are using
NOOBS , this has been done for you, so you can skip this step.

1. Click the Raspberry Pi icon at the top of the screen. This opens an
application list.

2. Select Accessories ➤ Terminal, as shown in Figure 2-4. When opened,


the terminal window is displayed (see Figure 2-5).

Figure 2-4 Terminal selection from the applications list. The terminal icon is also on the quick
access bar.

Figure 2-5 Terminal window

3. Type sudo raspi-config.


This opens the Raspberry Pi Software Configuration Tool, as shown in
Figure 2-6.
Figure 2-6 The raspi-config screen. Most OS-level options can be set here, including activating
and deactivating services.

Newer versions of Raspbian automatically expand your file system the


first time you start the Pi. Unless you are using an older version of
Raspbian, you should be able to skip this next step and move on to
changing the password.

4. Make sure that Expand file system is highlighted.

5. Press Enter. The system pops up a message about expanding the file
system and asks you to reboot. (We will reboot later, after we’ve made
most of our changes.) Next, we’ll change the user password.

6. Make sure that Change user password is highlighted.

7. Press Enter. The system displays a message saying that you’re going to be
prompted for a new password.

8. Press Enter. This drops you into the terminal to enter the new password.
9. Enter your new password and press Enter.

10. Confirm your new password and press Enter. This displays a confirmation
that the password was successfully updated (see Figure 2-7).

Figure 2-7 A password change confirmation in raspi-config

11. Press Enter.


The next few steps activate some services that we’ll be using later.
We’ll start by changing the hostname of your Pi to something unique
that is easier to find on the network. This becomes particularly important
when you’re in a room with 20 other Raspberry Pis.

12. Make sure that advanced options is highlighted, and then press Enter. This
displays the interface and other options (see Figure 2-8).
Figure 2-8 raspi-config advanced options. Hostname and service activation is accessed here.

The hostname is how your Raspberry Pi appears on the network. You’ll


want to give your Pi a unique name, especially when you consider how
many of them may be on the network at any given time. The hostname
should be both meaningful to the application and unique.

13. Highlight Hostname and press Enter.

14. A dialog box explains the requirements for a hostname. It must be only
alphanumeric characters: no symbols, no hyphens, and no underscores.
Press Enter to continue.

15. Enter your new hostname and press Enter.


SSH allows us to access the Pi through a terminal window (SSH client)
from another computer. On Windows, PuTTY is a very popular, free SSH
client . SSH does not provide a GUI. All interactions are made using
terminal commands. This is helpful if you want to quickly execute a
program, install software, and so forth. As you become more familiar with
the terminal, you will likely find yourself using SSH to connect for simple
commands, while reserving VNC (remote desktop) for more involved tasks
such as writing programs.

16. Go back to the advanced options menu.

17. Select Enable SSH and press Enter.

18. Confirm that you want to enable SSH and press Enter.

19. Press Enter again to return to the menu.


I2C is a serial communications protocol that is very popular in
embedded systems such as the Pi, Arduino, and so forth. It allows for
robust communication with multiple devices by using a number of pins.
The motor control board that we will use communicates via I2C . (If you
later choose to add other boards, such as a servo control board, it will also
use I2C.) As long as the devices have different addresses, you can keep
stacking them.

20. Go back to the advanced options menu.

21. Select Enable I2C and press Enter.

22. Confirm that you want to enable SSH, and then press Enter.

23. Press Enter again to return to the menu.


Because we also plan to use the Raspberry Pi headless (without a
monitor, keyboard, or mouse attached), let’s set it up to boot into the
console automatically. Don’t worry; it’s easy enough to launch the desktop
GUI when you want to, as you will see.

24. Go to boot options and press Enter.

Select Console and press Enter. If you trust that you’ll be the only one
25. accessing your Pi directly, you can choose Console Autologin . Autologin
does not apply to remote sessions, just direct access with a keyboard and a
monitor.
26. With all of the settings updated, highlight Finish and press Enter.

27. The Pi asks if you want to reboot. Select Yes and press Enter.
At this point, your Pi reboots. This may take a few minutes, especially
if you did not install via NOOBS and the Pi has to expand your file system.
Remember, we set up the Pi to boot into the console by default. Since
the next few steps are all done via the command line, we’ll not need to load
the GUI. However, let’s do it anyway so that you can see how easy it is.

28. Type startx and press Return.


You’re now in the GUI desktop.
To exit the desktop, do the following

1. Click the programs menu (the raspberry in the upper-left


corner).

2. Click the power button.

3. Select Exit to command line.

You should now be back to the command line.

Users
The default user on every installation of Raspbian is pi. Earlier, we changed the
password to make it more secure. However, you probably don’t want to always
log on as the pi user.
Remember when I said we’d start using the terminal more? Well, that starts
now. The easiest way to create and manage users is through the command line.
We’re going to walk through that process now.

Securing Root
In addition to the default user, pi, there is another default user on the Pi. This is
the root user. The root user is, essentially, an administrative user that is used by
the machine to execute low-level commands. This user has access to everything
and can do anything because, well, it’s the machine. Unlike the default pi user,
and can do anything because, well, it’s the machine. Unlike the default pi user,
however, root does not have a default password. It has no password.
So, while we’re configuring and securing the computer for our robot, let’s go
ahead and give the root user a password.

1. Open a terminal window.

2. Type sudo passwd root. (Note that passwd is the proper command
and not a typo.)

3. Enter the new password for the root user.

4. Enter the password again to confirm.


Your root user is now secured, which is good because you’ll need it for the
next step in the configuration.

Change the Default Username


The first thing you’re going to do is change the default username to something of
your choosing. What this will do is replace the username pi with your own
username. This provides another layer of security on the device; now, not only
would someone need to figure out the password , they wouldn’t even have the
default username to work with. It also preserves some of the special,
undocumented permissions that the default user is given.

1. Log out of the pi user. You can do this through the menu system or by
simply typing logout in a terminal.

2. Log on with your—now secure—root user.

3. Type

usermod -l <newname> pi

<newname> is the new username that you chose. Do not include < or >
in the command.

4. To update the home directory name, type


Other documents randomly have
different content
“All this while the Indians was a yellin' and screechin' and a wavin'
fire-brands front of the house. Col. Eph he stood a lookin' through a
hole in the shutter and a sightin' his gun while he was a talkin'. He
see that they'd been a pilin' up a great pile o' dry wood agin the
door. But the fust Indian that came up to put fire to't was shot right
down while he was a speakin'.
“Wal, Mis' Miller and Faith and Bije wa'n't long a dressin', you may
believe; and they jest put on dark cloaks, and they jest streaked it
out through the buttery-door! There was thick pole-beans quite up
to the buttery-door, and then a field o' high corn, so that they was
hid, and the way they run wasn't slow, I tell you.
“But Col. Eph he hed to stop so to load that they got the pile o'
brush afire, though he shot down three or four on 'em, and that was
some comfort. But the long and the short o' the matter was, that
they driv the door in at last, and came a whoopin' and yellin' into the
house.
“Wal, they took Col. Eph, and then went search-in' round to find
somebody else; but jest then the meetin'-house bell begun to ring,
and that scart 'em, and they took Col. Eph and made off with him.
He hedn't but jest time to get into his clothes and get his shoes on,
when they hurried him off. They didn't do nothin' to him jest then,
you see, these Indians was so cur'ous. If a man made a good fight,
and killed three or four on 'em afore they could take him, they sot
great store by him, and called him a brave man. And so they was
'mazin' careful of Col. Eph, and treated him quite polite for Indians;
but he knew the ways on 'em well enough to know what it was all
for. They wanted a real brave man to burn alive and stick slivers into
and torment, and Col. Eph was jest the pattern for 'em, and his
fight-in' so brave made him all the better for what they wanted.
“Wal, he was in hopes the town would be roused in time for some
of 'em to come arter him; but the Indians got the start of 'em, and
got 'way off in the woods afore people hed fairly come together and
found out what the matter was. There was Col. Eph's house a blazin'
and a lightin' up all the country for miles round; and the colonel he
said it come ruther hard on him to be lighted on his way through the
woods by such a bonfire.
“Wal, by mornin' they come to one o' their camps, and there they
hed a great rejoicin' over him. They was going to hev a great feast,
and a good time a burnin' on him; and they tied him to a tree, and
sot an Indian to watch him while they went out to cut pine knots
and slivers to do him with.
“Wal, as I said, Col. Eph was a brave man, and a man that always
kep' his thoughts about him; and so he kep' a workin' and a workin'
with the withs that was round his hands, and a prayin' in his heart to
the Lord, till he got his right hand free. Wal, he didn't make no
move, but kep' a loosenin' and a loosenin' little by little, keepin' his
eye on the Indian who sot there on the ground by him.
“Now, Col. Eph hed slipped his feet into his Sunday shoes that
stood there by the bed and hed great silver shoe-buckles; and there
was a providence in his doin' so, for, ye see, Indians are 'mazin' fond
o' shiny things.
“And the old Indian he was took with the shine o' these shoe-
buckles, and he thought he might as well hev 'em as anybody; so he
jest laid down his tommyhawk, and got down on his knees, and was
workin' away as earnest as could be to get off the buckles, and Col.
Eph he jest made a dart forward and picked up the tommyhawk, and
split open the Indian's skull with one blow: then he cut the withs
that was round his legs, and in a minute he was off on the run with
the tommyhawk in his hand. There was three Indians give chase to
him, but Col. Eph he kep' ahead of 'em. He said while he was a
runnin' he was cryin,' and callin' on the Lord with all his might, and
the words come into his mind he read at prayers the night afore,
'The race is not to the swift, nor the battle to the strong.'
“At last he see the Indians gained on him; and he faced round
suddenly, and struck the nighest one smack on the head with his
tommyhawk. Then when the next one come up he cut him down
too; and the third one, when he see both the others cut down, and
Col. Eph comin' full blaze towards him with his tommyhawk a
swingin', he jest turned and run for dear life. Then Col. Eph he
turned and cut for the settlement. He run, and he run, and he run,
he didn't well know how long, till, finally, he was clear tuckered out,
and he jest dropped down under a tree and slept; and he lay there
all the rest of that day, and all night, and never woke till the next
day about sundown.
“Then he woke up, and found he was close by home, and John
Stebbins, his wife's father, and a whole party, was out lookin' for
him.
“Old Col. Eph used to tell the story as long as he lived, and the
tears used to run down his cheeks when he told it.
“'There's a providence in every thing,' he used to say, 'even down
to shoe-buckles. Ef my Sunday shoes hadn't happened to 'a' set
there so I could 'a' slipped into 'em, I couldn't 'a' killed that Indian,
and I shouldn't 'a' been here to-day.' Wal, boys, he was in the right
on't. Some seem to think the Lord don't look out only for gret things,
but, ye see, little things is kind o' hinges that gret ones turns on.
They say, take care o' pennies, and dollars 'll take care o'
themselves. It's jest so in every thing; and, ef the Lord don't look
arter little things, he ain't so gret as they say, anyway.
“Wal, wal,” said Sam in conclusion, “now, who'd 'a' thought that
anybody could 'a' made any thing out o' Indians? Yet there 'twas. All
them Martha Vineyard Indians turned Christians, and there was
Indian preachers and Indian teachers; and they reely did settle
down, and get to be quite like folks. But I tell you, boys, it took faith
to start with.”
THE BULL-FIGHT.

T was Saturday afternoon,—time of blessed


memory to boys,—and we were free for a ramble
after huckleberries; and, with our pails in hand, were
making the best of our way to a noted spot where
that fruit was most abundant.
Sam was with us, his long legs striding over the
ground at a rate that kept us on a brisk trot, though
he himself was only lounging leisurely, with his usual
air of contemplation.
“Look 'ere, boys,” he suddenly said, pausing and
resting his elbow on the top of a rail-fence, “we shall
jest hev to go back and go round by Deakin Blodgett's
barn.”
“Why so?” we both burst forth in eager tones.
“Wal, don't ye see the deakin's turned in his bull into this 'ere lot?”
“Who cares?” said I. “I ain't afraid.”
“Nor I,” said Harry. “Look at him: he looks mild enough: he won't
hurt us.”
“Not as you knows on,” said Sam; “and then, agin, you don't
know,—nobody never knows, what one o' them 'ere critters will do:
they's jest the most contrary critters; and ef you think they're goin'
to do one way they're sure to do t'other. I could tell ye a story now
that'd jest make yer har stan' on eend.” Of course we wanted to
have our hair stand on end, and beset Sam for the story; but he
hung off.
“Lordy massy! boys, jest let's wait till ye've got yer huckleberries:
yer granny won't like it ef ye don't bring her none, and Hepsy she 'll
be in my har,—what's left on't,” said Sam, taking off his old torn hat,
and rubbing the loose shock of brash and grizzled hair.
So we turned and made a détour, leaving the bull on the right,
though we longed amazingly to have a bout with him, for the fun of
the thing, and mentally resolved to try it when our mentor was not
round.
It all comes back to me again,—the image of that huckleberry-
pasture, interwoven with fragrance of sweet-fern, and the ground
under our feet embroidered with star-moss and wintergreen, or
foamy patches of mossy frost-work, that crushed and crackled
delightfully beneath our feet. Every now and then a tall, straight fire-
lily—black, spotted in its centre—rose like a little jet of flame; and
we gathered it eagerly, though the fierce August sun wilted it in our
hands. The huckleberry-bushes, bending under their purple weight,
we gathered in large armfuls, and took them under the shadow of
the pine-trees, that we might strip them at our leisure, without being
scorched by the intense glare of the sun. Armful after armful we
carried and deposited in the shade, and then sat down to the task of
picking them off into our pails. It was one of those New-England
days hotter than the tropics, Not a breath of air was stirring, not a
bird sang a note, not a sound was heard, except the drowsy grating
of the locusts.
“Well, now, Sam, now tell us that story about the bull.”
“Lordy massy, how hot 'tis!” said Sam, lying back, and resting on
the roots of a tree, with his hands folded under his head. “I'm all in
a drip of sweat.”
“Well, Sam, we 'll pick off your berries, if you 'll talk.”
“Wall, wall, be kerful yer don't git no green ones in among 'em,
else Hepsy 'll be down on me. She's drefful partikelar, she is. Every
thing has to be jest so. Ef it ain't, you 'll hear on't. Lordy massy I
boys, she's always telling me I don't do nothin' for the support of the
family. I leave it to you if I didn't ketch her a nice mess o' fish a
Tuesday. I tell her folks can't expect to roll in money, and allers to
have every thing jess 'z they want it. We brought nothin' into the
world with us, and it's sartain we ken carry nothin' out; and, having
food and raiment, we ought to be content. We have ben better off'n
we be now. Why, boys, I've seen the time that I've spent thirty-
seven cents a week for nutmegs; but Hepsy hain't no gratitude: such
folks hez to be brought down. Take care, now, yer ain't a-putting
green ones in; be yer?”
“Sam, we sha'n't put in any at all, if you don't tell us that story.”
“Lordy massy! you young ones, there ain't never no contentin' yer,
ef a fellow was to talk to the millennium. Wonder now if there is
going to be any millennium. Wish I'd waited, and been born in them
days, 'spect things would a sorter come along easier. Wall, I shall git
through some way, I s'pose.”
“Sam,” said I, sitting back, “we're putting all our berries into your
pail; and, if you don't begin to tell us a story, we won't do it.”
“Lordy massy! boys, I'm kind o' collectin' my idees. Ye have to talk
a while to git a-goin', everybody does. Wal, about this 'ere story. Ye
'member that old brown house, up on the hill there, that we saw
when we come round the corner? That 'are was where old Mump
Moss used to live. Old Mump was consid'able of a nice man: he took
in Ike Sanders, Mis' Moss's sister's boy, to help him on the farm, and
did by him pretty much ez, he did by his own. Bill Moss, Mump's boy,
he was a con-trairy kind o' critter, and he was allers a-hectorin' Ike.
He was allers puttin' off the heaviest end of every thing on to him.
He'd shirk his work, and git it off on to Ike every way he could. And
he allers threw it up at him that he was eatin' his father's bread; and
he watched every mouthful he ate, as if he hated to see it go down.
Wal, ye see, for all that. Ike he growed up tall and strong, and a real
handsome young feller; and everybody liked him. And Bill he was so
gritty and contrairy, that his own mother and sisters couldn't stan'
him; and he was allers a-flingin' it up at 'em that they liked Ike
more'n they did him. Finally his mother she said to him one day,
'Why shouldn't I,' sez she, 'when Ike's allers pleasant to me, and
doin' every thing he ken fur me, and you don't do nothin' but scold.'
That 'are, you see, was a kind o' home-thrust, and Bill he didn't like
Ike a bit the better for that. He did every thing he could to plague
him, and hector him, and sarcumvent him, and set people agin him.
“Wal, ye see, 'twas the old story about Jacob and Laban over agin.
Every thing that Ike put his hand to kind o' prospered. Everybody
liked him, everybody hed a good word for him, everybody helped
grease his wheels. Wal, come time when he was twenty-one, old
Mump he gin him a settin' out. He gin him a freedom suit o' clothes,
and he gin him a good cow, and Mis' Moss she knit him up a lot o'
stockings, and the gals they made him up his shirts. Then, Ike he
got a place with Squire Wells, and got good wages; and he bought a
little bit o' land, with a house on it, on Squire Wells's place, and took
a mortgage on't, to work off. He used to work his own land, late at
night and early in the mornin', over and above givin' good days'
works to the squire; and the old squire he sot all the world by him,
and said he hedn't hed sich a man to work since he didn't know
when.
“Wal, a body might ha' thought that when Bill had a got him out o'
the house, he might ha' ben satisfied, but he wasn't. He was an ugly
fellow, Bill Moss was; and a body would ha' thought that every thing
good that happened to Ike was jest so much took from him. Come
to be young men, growed up together, and waitin' on the gals round,
Ike he was pretty apt to cut Bill out. Yer see, though Bill was goin' to
have the farm, and all old Mump's money, he warn't pleasant-
spoken; and so, when the gals got a chance, they'd allers rather go
with Ike than him. Finally, there was Delily Sawin, she was about the
handsomest girl there was round, and she hed all the fellers arter
her; and her way was to speak 'em all fair, and keep 'em all sort o'
waitin' and hopin', till she got ready to make her mind up. She'd
entertain Bill Saturday night, and she'd tell Ike he might come
Sunday night; and so Ike he was well pleased, and Bill he growled.
“Wal, there come along a gret cattle-show. Squire Wells he got it
up: it was to be the gretest kind of a time, and Squire Wells he give
money fur prizes. There was to be a prize on the best cow, and the
best bull, and the best ox, and the best horse, and the biggest
punkins and squashes and beets, and there was a prize for the best
loaf o' bread, and the best pair o' stockin's, and the handsomest
bed-quilt, and the rest o' women's work. Wal, yer see, there was a
gret to-do about the cattle-show; and the wagons they came in from
all around,—ten miles; and the gals all dressed up in their best
bunnits, and they had a ball in the evenin'. Wal, ye see, it so
happened that Bill and Ike each on 'em sent a bull to the cattle-
show; and Ike's bull took the prize. That put the cap-sheaf on for
Bill. He was jest about as much riled as a feller could be; and that
evenin' Delily she danced with Ike twice as many times ez she did
with him. Wal, Bill he got it round among the fellers that the jedges
hed been partial; and he said, if them bulls was put together, his bull
would whip Ike's all to thunder. Wal, the fellers thought 'twould be
kind o' fun to try 'em, and they put Ike up to it. And finally 'twas
agreed that Ike's bull should be driv over to old Mump's; and the
Monday after the cattle-show, they should let 'em out into the
meadow together and see which was the strongest. So there was a
Sunday the bulls they were both put up together in the same barn;
and the 'greement was, they wasn't to be looked at nor touched till
the time come to turn 'em out.
“Come Sunday mornin', they got up the wagon to go to meetin';
and Mis' Moss and the gals and old Mump, they was all ready; and
the old yaller dog he was standrn' waitin' by the wagon, and Bill
warn't nowhere to be found. So they sent one o' the girls up
chamber to see what'd got him; and there he was a-lyin' on the bed,
and said he'd got a drefful headache, and didn't think he could go to
meetin'. Wal, the second bell was a-tollin', and they had to drive off
without him: they never mistrusted but what 'twas jest so. Wal, yer
see, boys, 'twas that 'are kind o' Sunday headache that sort o' gets
better when the folks is all fairly into meetin'. So, when the wagon
was fairly out o' sight, Bill he thought he'd jest go and have a peek
at them bulls. Wal, he looked and he peeked, and finally he thought
they looked so sort o' innocent 'twouldn't do no harm to jest let 'em
have a little run in the cow-yard aforehand. He kind o' wanted to see
how they was likely to cut up. Now, ye see, the mischief about bulls
is, that a body never knows what they's goin' to do, 'cause whatever
notion takes 'em allers comes into their heads so kind o' suddin, and
it's jest a word and a blow with 'em. Wal, fust he let out his bull, and
then he went in and let out Ike's. Wal, the very fust thing that critter
did he run up to Bill's bull, full tilt, and jest gin one rip with his horns
right in the side of him, and knocked him over and killed him. Didn't
die right off, but he was done for; and Bill he gin a the old feller
turned right round, and come at him. I tell you, Bill he turned and
made a straight coattail, rippin' and peelin' it towards the house, and
the bull tearin' on right arter him. Into the kitchen he went, and he
hedn't no time to shut the door, and the bull arter him; and into the
keepin'-room, and the bull arter him there. And he hedn't but jest
time to git up the chamber-stairs, when he heard the old feller
roarin' and tearin' round there like all natur. Fust he went to the
lookin'-glass, and smashed that all to pieces. Then he histed the
table over, and he rattled and smashed the chairs round, and made
such a roaring and noise, ye'd ha' thought there was seven devils
there; and in the midst of it Bill he looked out of the window, and
see the wagon a-comin' back; and 'Lordy massy!' he thought to
himself, 'the bull 'll kill every one on 'em,' and he run to the window
and yelled and shouted, and they saw him, and thought the house
must be afire.
“Finally, he bethought him of old Mump's gun, and he run round
and got it, and poked it through a crack of the chamber-door, and
fired off bang! and shot him dead, jest as Mis' Moss and the girls
was comin' into the kitchen-door.
“Wal, there was, to be sure, the 'bomination o' desolation when
they come in and found every thing all up in a heap and broke to
pieces, and the old critter a-kickin' and bleedin' all over the carpet,
and Bill as pale as his shirt-tail on the chamber-stairs. They had an
awful mess on't; and there was the two bulls dead and to be took
care uv.
“'Wal, Bill,” said his father, “'I hope yer satisfied now. All that
comes o' stayin' to home from meetin', and keepin' temporal things
in yer head all day Sunday. You've lost your own bull, you've got
Ike's to pay for, and ye 'll have the laugh on yer all round the
country.'
“'I expect, father, we ken corn the meat,' says Mis' Moss, 'and
maybe the hide 'll sell for something,' sez she; for she felt kind o'
tender for Bill, and didn't want to bear down too hard on him.
“Wal, the story got round, and everybody was a-throwin' it up at
Bill; and Delily, in partikelar, hectored him about it till he wished the
bulls had been in the Red Sea afore he'd ever seen one on 'em. Wal,
it really driv him out o' town, and he went off out West to settle, and
nobody missed him much; and Ike he married Delily, and they grew
from better to better, till now they own jest about as pretty a farm
as there is round. Yer remember that white house with green blinds,
that we passed when we was goin' to the trout-brook? Wal, that
'ere's the one.”
HOW TO FIGHT THE DEVIL

OOK here, boys,” said Sam, “don't you want to go


with me up to the Devil's Den this arternoon?”
“Where is the Devil's Den,” said I, with a little awe.
“Wal, it's a longer tramp than I've ever took ye. It's
clear up past the pickerel pond, and beyond old Skunk
John's pasture-lot. It's a 'mazin' good place for
raspberries; shouldn't wonder if we should get two,
three quarts there. Great rocks there higher'n yer
head; kinder solemn, 'tis.”
This was a delightful and seductive account, and we
arranged for a walk that very afternoon.
In almost every New-England village the personality
of Satan has been acknowledged by calling by his name some
particular rock or cave, or other natural object whose singularity
would seem to suggest a more than mortal occupancy. “The Devil's
Punchbowl,” “The Devil's Wash-bowl,” “The Devil's Kettle,” “The
Devil's Pulpit,” and “The Devil's Den,” have been designations that
marked places or objects of some striking natural peculiarity. Often
these are found in the midst of the most beautiful and romantic
scenery, and the sinister name seems to have no effect in lessening
its attractions. To me, the very idea of going to the Devil's Den was
full of a pleasing horror. When a boy, I always lived in the shadowy
edge of that line which divides spirit land from mortal life, and it was
my delight to walk among its half lights and shadows. The old
graveyard where, side by side, mouldered the remains of Indian
sachems and the ancients of English blood, was my favorite haunt. I
loved to sit on the graves while the evening mists arose from them,
and to fancy cloudy forms waving and beckoning. To me, this spirit
land was my only refuge from the dry details of a hard, prosaic life.
The schoolroom—with its hard seats rudely fashioned from slabs of
rough wood, with its clumsy desks, hacked and ink-stained, with its
unintelligible textbooks and its unsympathetic teacher—was to me a
prison out of whose weary windows I watched the pomp and glory
of nature,—the free birds singing, the clouds sailing, the trees
waving and whispering,—and longed, as earnestly as ever did the
Psalmist, to flee far away, and wander in the wilderness.
Hence, no joy of after life—nothing that the world has now to give
—can equal that joyous sense of freedom and full possession which
came over me on Saturday afternoons, when I started off on a
tramp with the world all before me,—the mighty, unexplored world
of mysteries and possibilities, bounded only by the horizon. Ignorant
alike of all science, neither botanist nor naturalist, I was studying at
firsthand all that lore out of which science is made. Every plant and
flower had a familiar face to me, and said something to my
imagination. I knew where each was to be found, its time of coming
and going, and met them year after year as returning friends.
So it was with joyous freedom that we boys ram bled off with Sam
this afternoon, intent to find the Devil's Den. It was a ledge of
granite rocks rising in the midst of a grove of pines and white
birches. The ground was yellow and slippery with the fallen needles
of the pines of other days, and the glistening white stems of the
birches shone through the shadows like ivory pillars. Underneath the
great granite ledges, all sorts of roots and plants grappled and kept
foothold; and whole armies of wild raspberries matured their fruit,
rounder and juicier for growing in the shade.
In one place yawned a great rift, or cavern, as if the rocks had
been violently twisted and wrenched apart, and a mighty bowlder
lodging in the rift had roofed it over, making a cavern of most
seductive darkness and depth. This was the Devil's Den; and after
we had picked our pail full of berries, we sat down there to rest.
“Sam, do you suppose the Devil ever was here?” said I. “What do
they call this his den for?”
“Massy, child! that 'are was in old witch times. There used to be
witch meetins' held here, and awful doins'; they used to have witch
sabba' days and witch sacraments, and sell their souls to the old
boy.”
“What should they want to do that for?”
“Wal, sure enough; what was it for? I can't make out that the
Devil ever gin 'em any thing, any on 'em. They warn't no richer, nor
didn't get no more'n this world than the rest; and they was took and
hung; and then ef they went to torment after that, they hed a pretty
bad bargain on't, I say.”
“Well, people don't do such things any more, do they?” said I.
“No,” said Sam. “Since the gret fuss and row-de-dow about it, it's
kind o' died out; but there's those, I s'pose, that hez dealins' with
the old boy. Folks du say that old Ketury was a witch, and that, ef't
ben in old times, she'd a hed her neck stretched; but she lived and
died in peace.”
“But do you think,” said I, now proposing the question that lay
nearest my heart, “that the Devil can hurt us?”
“That depends consid'able on how you take him,” said Sam. “Ye
see, come to a straight out-an'-out fight with him, he 'll git the better
on yer.”
“But,” said I, “Christian did fight Apollyon, and got him down too.”
I had no more doubt in those days that this was an historic fact
than I had of the existence of Romulus and Remus and the wolf.
“Wal, that 'ere warn't jest like real things: they say that 'ere's an
allegory. But I 'll tell ye how old Sarah Bunganuck fit the Devil, when
he 'peared to her. Ye see, old Sarah she was one of the converted
Injuns, and a good old critter she was too; worked hard, and got her
livin' honest. She made baskets, and she made brooms, and she
used to pick young wintergreen and tie it up in bunches, and dig
sassafras and ginsing to make beer; and she got her a little bit o'
land, right alongside o' Old Black Hoss John's white-birch wood-lot.
“Now, I've heerd some o' these 'ere modern ministers that come
down from Cambridge college, and are larnt about every thing in
creation, they say there ain't no devil, and the reason on't is, 'cause
there can't be none. These 'ere fellers is so sort o' green!—they
don't mean no harm, but they don't know nothin' about nobody that
does. If they'd ha' known old Black Hoss John, they'd ha' been putty
sure there was a devil. He was jest the crossest, ugliest critter that
ever ye see, and he was ugly jest for the sake o' ugliness. He
couldn't bear to let the boys pick huckleberries in his paster lots,
when he didn't pick 'em himself; and he was allers jawin' me 'cause I
would go trout-fishin' in one o' his pasters. Jest ez if the trout that
swims warn't, the Lord's, and jest ez much mine as his. He grudged
every critter every thing; and if he'd ha' hed his will and way, every
bird would ha' fell down dead that picked up a worm on his grounds.
He was jest as nippin' as a black frost. Old Black Hoss didn't git
drunk in a regerlar way, like Uncle Eph and Toddy Whitney, and the
rest o' them boys. But he jest sot at home, a-soakin' on cider, till he
was crosser'n a bear with a sore head. Old Black Hoss hed a special
spite agin old Sarah. He said she was an old witch and an old thief,
and that she stole things off'n his grounds, when everybody knew
that she was a regerlar church-member, and as decent an old critter
as there was goin'. As to her stealin', she didn't do nothin' but pick
huckleberries and grapes, and git chesnuts and wannuts, and
butternuts, and them 'ere wild things that's the Lord's, grow on
whose land they will, and is free to all. I've hearn 'em tell that, over
in the old country, the poor was kept under so, that they couldn't
shoot a bird, nor ketch a fish, nor gather no nuts, nor do nothin' to
keep from starvin', 'cause the quality folks they thought they owned
every thing, 'way-down to the middle of the earth and clear up to
the stars. We never hed no sech doin's this side of the water, thank
the Lord! We've allers been free to have the chesnuts and the
wannuts and the grapes and the huckleberries and the strawberries,
ef we could git 'em, and ketch fish when and where we was a mind
to. Lordy massy! your grandthur's old Cesar, he used to call the pond
his pork-pot. He'd jest go down and throw in a line and ketch his
dinner. Wal, Old Black Hoss he know'd the law was so, and he
couldn't do nothin' agin her by law; but he sarved her out every
mean trick he could think of. He used to go and stan' and lean over
her garden-gate and jaw at her an hour at a time; but old Sarah she
had the Injun in her; she didn't run to talk much: she used to jest
keep on with her weedin and her work, jest's if he warn't there, and
that made Old Black Hoss madder'n ever; and he thought he'd try
and frighten her off'n the ground, by makin' on her believe he was
the Devil. So one time, when he'd been killin' a beef critter, they
took off the skin with the horns and all on; and Old Black Hoss he
says to Toddy and Eph and Loker, 'You jest come up tonight, and see
how I 'll frighten old Sarah Bunganuck.'
“Wal, Toddy and Eph and Loker, they hedn't no better to do, and
they thought they'd jest go round and see. Ye see 'twas a moonlight
night, and old Sarah—she was an industrious critter—she was cuttin'
white-birch brush for brooms in the paster-lot.
“Wal, Old Black Hoss he wrapped the critter's skin round him, with
the horns on his head, and come and stood by the fence, and begun
to roar and make a noise.
“Old Sarah she kept right on with her work, cuttin' her brush and
pilin' on't up, and jest let him roar. Wal, Old Black Hoss felt putty
foolish, 'specially ez the fellers were waitin' to see how she took it.
So he calls out in a grum voice,—
“'Woman, don't yer know who I be?”
“'No,' says she quite quiet, 'I don't know who yer be.'
“'Wal, I'm the Devil,' sez he.
“'Ye be?' says old Sarah. 'Poor old critter, how I pity ye!' and she
never gin him another word, but jest bundled up her broom-stuff,
and took it on her back and walked off, and Old Black Hoss he stood
there mighty foolish with his skin and horns; and so he had the
laugh agin him, 'cause Eph and Loker they went and told the story
down to the tavern, and he felt awful cheap to think old Sarah had
got the upper hands on him.
“Wal, ye see, boys, that 'ere's jest the way to fight the Devil. Jest
keep straight on with what ye're doin', and don't ye mind him, and
he can't do nothin' to ye.”
LAUGHIN' IN MEETIN'

E were in disgrace, we boys; and the reason of it


was this: we had laughed out in meeting-time! To be
sure, the occasion was a trying one, even to more
disciplined nerves. Parson Lothrop had exchanged
pulpits with Parson Summeral, of North Wearem. Now,
Parson Summeral was a man in the very outset likely
to provoke the risibles of unspiritualized juveniles. He
was a thin, wiry, frisky little man, in a powdered white
wig, black tights, and silk stockings, with bright knee-
buckles and shoe-buckles; with round, dark, snapping
eyes; and a curious, high, cracked, squeaking voice,
the very first tones of which made all the children stare and giggle.
The news that Parson Summeral was going to preach in our village
spread abroad among us as a prelude to something funny. It had a
flavor like the charm of circus-acting; and, on the Sunday morning of
our story, we went to the house of God in a very hilarious state, all
ready to set off in a laugh on the slightest provocation.
The occasion was not long wanting. Parson Lo-throp had a
favorite dog yclept Trip, whose behavior in meeting was notoriously
far from that edifying pattern which befits a minister's dog on
Sundays. Trip was a nervous dog, and a dog that never could be
taught to conceal his emotions or to respect conventionalities. If any
thing about the performance in the singers' seat did not please him,
he was apt to express himself in a lugubrious howl. If the sermon
was longer than suited him, he would gape with such a loud creak of
his jaws as would arouse everybody's attention. If the flies disturbed
his afternoon's nap, he would give sudden snarls or snaps; or, if
anything troubled his dreams, he would bark out in his sleep in a
manner not only to dispel his own slumbers, but those of certain
worthy deacons and old ladies, whose sanctuary repose was thereby
sorely broken and troubled. For all these reasons, Madame Lo-throp
had been forced, as a general thing, to deny Trip the usual sanctuary
privileges of good family dogs in that age, and shut him up on
Sundays to private meditation. Trip, of course, was only the more set
on attendance, and would hide behind doors, jump out of windows,
sneak through by-ways and alleys, and lie hid till the second bell had
done tolling, when suddenly he would appear in the broad aisle,
innocent and happy, and take his seat as composedly as any
member of the congregation.
Imagine us youngsters on the qui vive with excitement at seeing
Parson Summeral frisk up into the pulpit with all the vivacity of a
black grasshopper. We looked at each other, and giggled very
cautiously, with due respect to Aunt Lois's sharp observation.
At first, there was only a mild, quiet simmering of giggle,
compressed decorously within the bounds of propriety; and we
pursed our muscles up with stringent resolution, whenever we
caught the apprehensive eye of our elders.
But when, directly after the closing notes of the tolling second
bell, Master Trip walked gravely up the front aisle, and, seating
himself squarely in front of the pulpit, raised his nose with a critical
air toward the scene of the forthcoming performance, it was too
much for us: the repression was almost convulsive. Trip wore an
alert, attentive air, befitting a sound, orthodox dog, who smells a
possible heresy, and deems it his duty to watch the performances
narrowly.
Evidently he felt called upon to see who and what were to occupy
that pulpit in his master's absence.
Up rose Parson Summeral; and up went Trip's nose, vibrating with
intense attention.
The parson began in his high-cracked voice to intone the hymn,—

“Sing to the Lord aloud,”


when Trip broke into a dismal howl.
The parson went on to give directions to the deacon, in the same
voice in which he had been reading, so that the whole effect of the
performance was somewhat as follows:—

“'Sing to the Lord aloud.'

“(Please to turn out that dog),—

“'And make a joyful noise.,”

The dog was turned out, and the choir did their best to make a
joyful noise; but we boys were upset for the day, delivered over to
the temptations of Satan, and plunged in waves and billows of
hysterical giggle, from which neither winks nor frowns from Aunt
Lois, nor the awful fear of the tithing-man, nor the comforting bits of
fennel and orange-peel passed us by grandmother, could recover us.
Everybody felt, to be sure, that here was a trial that called for
some indulgence. Hard faces, even among the stoniest saints,
betrayed a transient quiver of the risible muscles; old ladies put up
their fans; youths and maidens in the singers' seat laughed outright;
and, for the moment, a general snicker among the children was
pardoned. But I was one of that luckless kind, whose nerves, once
set in vibration, could not be composed. When the reign of gravity
and decorum had returned, Harry and I sat by each other, shaking
with suppressed laughter. Every thing in the subsequent exercises
took a funny turn; and in the long prayer, when everybody else was
still and decorous, the whole scene came over me with such
overpowering force, that I exploded with laughter, and had to be
taken out of meeting and marched home by Aunt Lois, as a
convicted criminal. What especially moved her indignation was, that,
the more she rebuked and upbraided, the more I laughed, till the
tears rolled down my cheeks; which Aunt Lois construed into wilful
disrespect to her authority, and resented accordingly.
By Sunday evening, as we gathered around the fire, the re-action
from undue gayety to sobriety had taken place; and we were in a
pensive and penitent state. Grandmother was gracious and
forgiving; but Aunt Lois still preserved that frosty air of reprobation
which she held to be a salutary means of quickening our consciences
for the future. It was, therefore, with unusual delight that we saw
our old friend Sam come in, and sit himself quietly down on the
block in the chimney corner. With Sam we felt assured of indulgence
and patronage; for, though always rigidly moral and instructive in his
turn of mind, he had that fellow-feeling for transgressors which is
characteristic of the loose-jointed, easy-going style of his
individuality.
“Lordy massy, boys—yis,” said Sam virtuously, in view of some of
Aunt Lois's thrusts, “ye ought never to laugh nor cut up in meetin';
that 'are's so: but then there is times when the best on us gets took
down. We gets took unawares, ye see,—even ministers does. Yis,
natur' will git the upper hand afore they know it.”
“Why, Sam, ministers don't ever laugh in meetin'! do they?”
We put the question with wide eyes. Such a supposition bordered
on profanity, we thought: it was approaching the sin of Uzzah, who
unwarily touched the ark of the Lord.
“Laws, yes. Why, heven't you never heard how there was a council
held to try Parson Morrel for laughin' out in prayer-time?”
“Laughing in prayer-time!” we both repeated, with uplifted hands
and eyes.
My grandfather's mild face became luminous with a suppressed
smile, which brightened it as the moon does a cloud; but he said
nothing.
“Yes, yes,” said my grandmother, “that affair did make a dreadful
scandal in the time on't! But Parson Morrel was a good man; and I'm
glad the council wasn't hard on him.”
“Wal,” said Sam Lawson, “after all, it was more Ike Babbit's fault
than 'twas anybody's. Ye see, Ike he was allers for gettin' what he
could out o' the town; and he would feed his sheep on the meetin'-
house green. Somehow or other, Ike's fences allers contrived to give
out, come Sunday, and up would come his sheep; and Ike was too
pious to drive 'em back Sunday, and so there they was. He was
talked to enough about it: 'cause, ye see, to hev sheep and lambs a
ba-a-in' and a blatin' all prayer and sermon time wa'n't the thing.
'Member that 'are old meet-in'-house up to the North End, down
under Blueberry Hill, the land sort o' sloped down, so as a body hed
to come into the meetin'-house steppin' down instead o' up.
“Fact was, they said 'twas put there 'cause the land wa'n't good
for nothin' else; and the folks thought puttin' a meetin'-house on't
would be a clear savin'. But Parson Morrel he didn't like it, and was
free to tell 'em his mind on't,—that 'twas like bringin' the lame and
the blind to the Lord's sarvice; but there 'twas.
“There wa'n't a better minister, nor no one more set by in all the
State, than Parson Morrel. His doctrines was right up and down,
good and sharp; and he give saints and sinners their meat in due
season; and for consolin' and comfortin' widders and orphans,
Parson Morrel hedn't his match. The women sot lots by him; and he
was allus' ready to take tea round, and make things pleasant and
comfortable; and he hed a good story for every one, and a word for
the children, and maybe an apple or a cookey in his pocket for 'em.
Wal, you know there an't no pleasin' everybody; and ef Gabriel
himself, right down out o' heaven, was to come and be a minister, I
expect there'd be a pickin' at his wings, and sort o' fault-findin'. Now,
Aunt Jerushy Scran and Aunt Polly Hokun they sed Parson Morrel
wa'n't solemn enough. Ye see, there's them that thinks that a
minister ought to be jest like the town hearse, so that ye think of
death, judgment, and eternity, and nothin' else, when ye see him
round; and ef they see a man rosy and chipper, and hevin' a pretty
nice, sociable sort of a time, why they say he an't spiritooal minded.
But, in my times, I've seen ministers the most awakenin' kind in the
pulpit that was the liveliest when they was out on't. There is a time
to laugh, Scriptur' says; tho' some folks never seem to remember
that 'are.”
“But, Sam, how came you to say it was Ike Babbit's fault? What
was it about the sheep?”
“Oh, wal, yis! I'm a comin' to that 'are. It was all about them
sheep. I expect they was the instrument the Devil sot to work to
tempt Parson Morrel to laugh in prayer-time.
“Ye see, there was old Dick, Ike's bell-wether, was the fightin'est
old crittur that ever yer see. Why, Dick would butt at his own
shadder; and everybody said it was a shame the old crittur should
be left to run loose, 'cause he run at the children, and scared the
women half out their wits. Wal, I used to live out in that parish in
them days. And Lem Sudoc and I used to go out sparkin' Sunday
nights, to see the Larkin gals; and we had to go right 'cross the lot
where Dick was: so we used to go and stand at the fence, and call.
And Dick would see us, and put down his head, and run at us full
chisel, and come bunt agin the fence; and then I'd ketch him by the
horns, and hold him while Lem run and got over the fence t'other
side the lot; and then I'd let go: and Lem would holler, and shake a
stick at him, and away he'd go full butt at Lem; and Lem would
ketch his horns, and hold him till I came over,—that was the way we
managed Dick; but, I tell you, ef he come sudden up behind a
fellow, he'd give him a butt in the small of his back that would make
him run on all fours one while. He was a great rogue,—Dick was.
Wal, that summer, I remember they hed old Deacon Titkins for
tithing-man; and I tell you he give it to the boys lively. There wa'n't
no sleepin' nor no playin'; for the deacon hed eyes like a gimblet,
and he was quick as a cat, and the youngsters hed to look out for
themselves. It did really seem as if the deacon was like them four
beasts in the Revelations that was full o' eyes behind and before; for
which ever way he was standin', if you gave only a wink, he was
down on you, and hit you a tap with his stick. I know once Lem
Sudoc jist wrote two words in the psalm-book and passed to Kesiah
Larkin; and the deacon give him such a tap that Lem grew red as a
beet, and vowed he'd be up with him some day for that.
“Well, Lordy Massy, folks that is so chipper and high steppin' has
to hev their come downs; and the deacon he hed to hev his.
“That 'are Sunday,—I 'member it now jest as well as if 'twas
yesterday,—the parson he give us his gre't sermon, reconcilin'
decrees and free agency: everybody said that 'are sermon was a
masterpiece. He preached it up to Cambridge at Commencement,
that year. Wal, it so happened it was one o' them bilin' hot days that
come in August, when you can fairly hear the huckleberries a sizzlin',
and cookin' on the bushes, and the locust keeps a gratin' like a red-
hot saw. Wal, such times, decrees or no decrees, the best on us will
get sleepy. The old meetin'-house stood right down at the foot of a
hill that kep' off all the wind; and the sun blazed away at them gre't
west winders: and there was pretty sleepy times there. Wal, the
deacon, he flew round a spell, and woke up the children, and tapped
the boys on the head, and kep' every thing straight as he could, till
the sermon was most through, when he railly got most tuckered out;
and he took a chair, and he sot down in the door right opposite the
minister, and fairly got asleep himself, jest as the minister got up to
make the last prayer.
“Wal, Parson Morrel hed a way o' prayin' with his eyes open. Folks
said it wa'n't the best way: but it was Parson Morrel's way, anyhow;
and so, as he was prayin', he couldn't help seein' that Deacon Tit-
kins was a noddin' and a bobbin' out toward the place where old
Dick was feedin' with the sheep, front o' the meetin'-house door.
“Lem and me we was sittin' where we could look out; and we jest
sees old Dick stop feedin' and look at the deacon. The deacon hed a
little round head as smooth as an apple, with a nice powdered wig
on it: and he sot there makin' bobs and bows; and Dick begun to
think it was suthin sort o' pussonal. Lem and me was sittin' jest
where we could look out and see the hull picter; and Lem was fit to
split.
“'Good, now,' says he: 'that crittur 'll pay the deacon off lively,
pretty soon.'
“The deacon bobbed his head a spell; and old Dick he shook his
horns, and stamped at him sort o' threat-nin'. Finally the deacon he
give a great bow, and brought his head right down at him; and old
Dick he sot out full tilt and come down on him ker chunk, and
knocked him head over heels into the broad aisle: and his wig flew
one way and he t'other; and Dick made a lunge at it, as it flew, and
carried it off on his horns.
“Wal, you may believe, that broke up the meetin' for one while:
for Parson Morrel laughed out; and all the gals and boys they
stomped and roared. And the old deacon he got up and begun
rubbin' his shins, 'cause he didn't see the joke on't.
“'You don't orter laugh,' says he: 'it's no laughin' matter; it's a
solemn thing,' says he. 'I might hev been sent into 'tarnity by that
darned crittur,' says he. Then they all roared and haw-hawed the
more, to see the deacon dancin' round with his little shiny head, so
smooth a fly would trip up on't. 'I believe, my soul, you'd laugh to
see me in my grave,' says he.
“Wal, the truth on't was, 'twas jist one of them bustin' up times
that natur has, when there an't nothin' for it but to give in: 'twas jest
like the ice breakin' up in the Charles River,—it all come at once, and
no whoa to't. Sunday or no Sunday, sin or no sin, the most on 'em
laughed till they cried, and couldn't help it.
“But the deacon, he went home feelin' pretty sore about it. Lem
Sudoc, he picked up his wig, and handed it to him. Says he, 'Old
Dick was playin' tithin'-man, wa'n't he, deacon? Teach you to make
allowance for other folks that get sleepy.'
“Then Miss Titkins she went over to Aunt Jerushy Scran's and Aunt
Polly Hokum's; and they hed a pot o' tea over it, and 'greed it was
awful of Parson Morrel to set sich an example, and suthin' hed got to
be done about it. Miss Hokum said she allers knew that Parson
Morrel hedn't no spiritooality; and now it hed broke out into open
sin, and led all the rest of 'em into it; and Miss Titkins, she said such
a man wa'n't fit to preach; and Miss Hokum said she couldn't never
hear him agin: and the next Sunday the deacon and his wife they
hitched up and driv eight miles over to Parson Lothrop's and took
Aunt Polly on the back seat.
“Wal, the thing growed and growed, till it seemed as if there
wa'n't nothin' else talked about, 'cause Aunt Polly and Miss Titkins
and Jerushy Scran they didn't do nothin' but talk about it; and that
sot everybody else a-talkin'.
“Finally, it was 'greed they must hev a council to settle the hash.
So all the wimmen they went to choppin' mince, and makin' up
pumpkin pies and cranberry tarts, andb'ilin' doughnuts,—gettin'
ready for the ministers and delegates; 'cause councils always eats
powerful: and they hed quite a stir, like a gineral trainin'. The hosses
they was hitched all up and down the stalls, a-stompin' and switchin'
their tails; and all the wimmen was a-talkin'; and they hed up
everybody round for witnesses. And finally Parson Morrel he says,
'Brethren,' says he, 'jest let me tell you the story jest as it happened;
and, if you don't every one of you laugh as hard as I did, why, then,
I 'll give up.'
“The parson he was a master-hand at settin' off a story; and,
afore he'd done, he got 'em all in sich a roar they didn't know where
to leave off. Finally, they give sentence that there hedn't no
temptation took him but such as is common to man; but they
advised him afterwards allers to pray with his eyes shet; and the
parson he confessed he orter 'a done it, and meant to do better in
future: and so they settled it.
“So, boys,” said Sam, who always drew a moral, “ye see, it larns
you, you must take care what ye look at, ef ye want to keep from
laughin' in meetin'”.
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!

ebooknice.com

You might also like