(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
(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
com
https://ebooknice.com/product/beginning-robotics-with-
raspberry-pi-and-arduino-using-python-and-opencv-pdfdrive-
com-50195874
OR CLICK BUTTON
DOWLOAD EBOOK
(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
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 .
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.
Robotics Basics
Project Overview
The Robot
Summary
Connecting Raspberry Pi
Configuring Your Pi
Using raspi-config
Users
Connecting to a Wireless Network
Going Headless
Remote Access
Summary
Python Overview
Python Tools
Hello World
Basic Structure
Running a Program
Programming in Python
Variables
Data Types
Control Structures
Functions
Adding Functionality through Modules
Classes
Styling
Summary
Raspberry Pi GPIO
Pin Numbering
Simple Input
Summary
Analog Input
Analog Output
Using Arduino
Programming Arduino
Sketches
Control Structures
Serial
Pinguino
Summary
Types of Motors
Motor Properties
Motor Drivers
Summary
Choosing a Material
The Whippersnapper
Wiring
Mounting Sensors
Summary
Infrared Sensors
Types of IR Sensors
Connecting an IR Sensor
The Code
Control Loops
Implementing the PID Controller
Summary
Computer Vision
OpenCV
Selecting a Camera
OpenCV Basics
Capturing Images
Image Transformations
Ball-Chasing Bot
Summary
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.
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.
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.
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)
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.
1. Navigate to www.raspberrypi.org/downloads/ .
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.
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.
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.
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/ .
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.
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)).
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 .
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.
Figure 2-4 Terminal selection from the applications list. The terminal icon is also on the quick
access bar.
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.
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).
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.
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.
18. Confirm that you want to enable SSH and press Enter.
22. Confirm that you want to enable SSH, and then 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.
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.
2. Type sudo passwd root. (Note that passwd is the proper command
and not a typo.)
1. Log out of the pi user. You can do this through the menu system or by
simply typing logout in a terminal.
3. Type
usermod -l <newname> pi
<newname> is the new username that you chose. Do not include < or >
in the command.
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.
ebooknice.com