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

Science and Engineering Projects Using the Arduino and Raspberry Pi: Explore STEM Concepts with Microcomputers 1st Edition Paul Bradt - Get instant access to the full ebook content

The document promotes an ebook titled 'Science and Engineering Projects Using the Arduino and Raspberry Pi' by Paul Bradt, which explores STEM concepts through various projects. It provides links to download the ebook and additional resources related to Arduino and Raspberry Pi projects. The book aims to help readers understand and apply science, technology, engineering, and mathematics through hands-on learning experiences.

Uploaded by

ehnesbeskaxm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
13 views

Science and Engineering Projects Using the Arduino and Raspberry Pi: Explore STEM Concepts with Microcomputers 1st Edition Paul Bradt - Get instant access to the full ebook content

The document promotes an ebook titled 'Science and Engineering Projects Using the Arduino and Raspberry Pi' by Paul Bradt, which explores STEM concepts through various projects. It provides links to download the ebook and additional resources related to Arduino and Raspberry Pi projects. The book aims to help readers understand and apply science, technology, engineering, and mathematics through hands-on learning experiences.

Uploaded by

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

Explore the full ebook collection and download it now at textbookfull.

com

Science and Engineering Projects Using the Arduino


and Raspberry Pi: Explore STEM Concepts with
Microcomputers 1st Edition Paul Bradt

https://textbookfull.com/product/science-and-engineering-
projects-using-the-arduino-and-raspberry-pi-explore-stem-
concepts-with-microcomputers-1st-edition-paul-bradt-2/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://textbookfull.com


Click here to visit textbookfull.com and download textbook now
Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Science and Engineering Projects Using the Arduino and


Raspberry Pi: Explore STEM Concepts with Microcomputers
1st Edition Paul Bradt
https://textbookfull.com/product/science-and-engineering-projects-
using-the-arduino-and-raspberry-pi-explore-stem-concepts-with-
microcomputers-1st-edition-paul-bradt-2/
textbookfull.com

Beginning Robotics with Raspberry Pi and Arduino: Using


Python and OpenCV Jeff Cicolani

https://textbookfull.com/product/beginning-robotics-with-raspberry-pi-
and-arduino-using-python-and-opencv-jeff-cicolani/

textbookfull.com

Beginning Robotics with Raspberry Pi and Arduino: Using


Python and OpenCV 2nd Edition Jeff Cicolani

https://textbookfull.com/product/beginning-robotics-with-raspberry-pi-
and-arduino-using-python-and-opencv-2nd-edition-jeff-cicolani/

textbookfull.com

Beginning Robotics with Raspberry Pi and Arduino: Using


Python and OpenCV 2nd Edition Jeff Cicolani

https://textbookfull.com/product/beginning-robotics-with-raspberry-pi-
and-arduino-using-python-and-opencv-2nd-edition-jeff-cicolani-2/

textbookfull.com
Internet of Things with Raspberry Pi and Arduino 1st
Edition Rajesh Singh (Author)

https://textbookfull.com/product/internet-of-things-with-raspberry-pi-
and-arduino-1st-edition-rajesh-singh-author/

textbookfull.com

Action movement light and sound with Arduino and Raspberry


Pi First Edition Monk

https://textbookfull.com/product/action-movement-light-and-sound-with-
arduino-and-raspberry-pi-first-edition-monk/

textbookfull.com

Internet Of things With Raspberry Pi And Arduino First


Edition. Edition Rajesh Singh

https://textbookfull.com/product/internet-of-things-with-raspberry-pi-
and-arduino-first-edition-edition-rajesh-singh/

textbookfull.com

Raspberry Pi Home Automation with Arduino 2nd Edition


Andrew K. Dennis

https://textbookfull.com/product/raspberry-pi-home-automation-with-
arduino-2nd-edition-andrew-k-dennis/

textbookfull.com

Hacking Electronics: Learning Electronics with Arduino and


Raspberry Pi, 2nd Edition Simon Monk

https://textbookfull.com/product/hacking-electronics-learning-
electronics-with-arduino-and-raspberry-pi-2nd-edition-simon-monk/

textbookfull.com
Paul Bradt and David Bradt

Science and Engineering Projects Using


the Arduino and Raspberry Pi
Explore STEM Concepts with Microcomputers
Paul Bradt
Houston, TX, USA

David Bradt
Houston, 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-5810-1. For
more detailed information, please visit http://​www.​apress.​com/​
source-code.

ISBN 978-1-4842-5810-1 e-ISBN 978-1-4842-5811-8


https://doi.org/10.1007/978-1-4842-5811-8

Apress standard
© Paul Bradt and David Bradt 2020

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.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

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 orders-
[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.
The authors dedicate this book to all of the Science, Technology,
Engineering, Math (STEM) teachers who guide and shape the paths of
many young minds (including ours) to question, learn, and utilize new
technology to solve problems. Without these unsung heroes, the world
would not have powerful cell phones, highly reliable cars, the Internet,
and many other amazing things we routinely take for granted.
Introduction
The authors’ journey developing this book started in 2013 when they
discovered the Arduino microcontroller. It is interesting how something
big really starts with one step as they found the Arduino incredibly
powerful. Users are able to program it with computer code, and then it
executes its instructions for as long as it has power. The authors started
evaluating various applications of the Arduino around the house and in
their hobby endeavors. In 2017, they started experimenting with the
Raspberry Pi minicomputer which enables users to take projects to a
whole new level with a low-cost computer that interfaces with sensors.
Since a Raspberry Pi is very affordable, a real computer can now be
dedicated to operating a system permanently. While requiring some
technical steps to set up, both of these tools can be used to gather data,
automate tasks, and provide a lot of fun. The authors found it very
satisfying to watch a device do several tasks, especially when they set it
up. This book chronicles some science and engineering projects the
authors developed over the past few years and provides helpful hints,
along with a few things to avoid.
There are two primary areas of focus or goals of this book. The first
goal is to help the reader explore the Arduino and Raspberry Pi. The
second goal is exploring science and engineering in interesting and fun
ways.
The projects and concepts in this book are meant to accomplish the
first goal by providing information to get an Arduino or Raspberry Pi
system set up, running, and ready to capture data. The text provides
enough detail for users with average assembly or electrical skills to
complete them. Additionally, the goals of learning are to gain
knowledge and skills. When the reader engages in a project that
requires them to try new things, it reinforces how they learn and gain
confidence and encourages them to try even more complex tools and
techniques.
The second goal is exploring concepts of STEM (Science,
Technology, Engineering, Mathematics) and working through examples
to demonstrate basic scientific and engineering concepts. Finally, the
authors provide some detail on the mathematics needed to understand
and explain the science demonstrated.
Science and engineering provide critical skill sets for the modern
world that can be used in everyday life. People use these skills to
develop the technology that the modern world relies on. This book can
establish these skill sets for a fruitful and rewarding career.
The authors hope this book inspires the reader to expand and
explore their own STEM projects by including a wide range from
beginner to advanced. From these examples, the reader can learn many
techniques, tools, and technologies and apply them beyond the ones
listed here; but first, the authors introduce STEM.

What Is STEM?
STEM (Science, Technology, Engineering, Mathematics) is a program
based on educating students in science, technology, engineering, and
mathematics in an integrated, interdisciplinary approach to learning.
School systems today strive to improve education in STEM. This goal
is an area where educators can use outside help developing and
improving students’ knowledge when they actively contribute, design,
and build hands-on projects. In many ways, the young mind is excited
and motivated building projects. They develop an in-depth
understanding of what is required and how it works. The authors
believe this is the best way to learn and remember these concepts,
which results in a solid STEM foundation for students.
A question not often understood is how the scientific method is
different from an engineering approach. Understanding the difference
between science and engineering can be seen in the original Star Trek
series. Mr. Spock was the science officer, and Montgomery Scott (Scotty)
was the chief engineer. Their jobs and how they approached new
scenarios or problems really provide a great explanation about the
differences and similarities between science and engineering. Let’s
examine some examples.
Mr. Spock used the term fascinating when describing a new event or
phenomenon. The role of science is to expand knowledge and
investigate new events. This fascination with new and unique areas is
key for a scientist. Scotty, the engineer, on the other hand always had to
fix the warp engines, the transporter, or some other critical system. The
normal role of an engineer is to develop and implement solutions to
problems. In one of the episodes, Scotty indicated he would rather read
his engineering journals to learn about how others solved problems
than go on shore leave!

Science
Researchers use the scientific method as a tool to understand questions
in their area of interest. Based on the information they have initially,
they develop a hypothesis and then methods to test the validity of the
hypothesis. When sufficient test data are gathered and analyzed, the
researcher either accepts or rejects the hypothesis. In many cases,
positive or negative results point to the next step or direction of
exploration and contribute to the general body of scientific and
engineering knowledge.

Engineering
The primary goal of engineering is to evaluate alternatives and choose
the optimal solution to minimize or eliminate specific problems or
issues. Solutions are not necessarily new, but may be repurposed
concepts applied to different problem areas. Other aspects of
engineering include planning the work, selecting components to meet
requirements, and following through on managing and completing a
project. Often projects or systems fail because the planning, scheduling,
and logistics of activities are not adequately engineered for an optimum
solution. These skills are important and necessary in any job.
Science and engineering use many of the same tools and techniques,
but it is important to understand the distinction between scientific
experimentation and the engineering process of developing optimal
solutions. For one thing, they both use the language of mathematics to
describe percentages, results, probability, and other physical
parameters. However, science’s goal is to expand knowledge which is
different than engineering’s goal of selecting an optimum solution and
proceeding with solving the problem. One other difference is a scientific
test often gains new knowledge, whereas an engineering test often
demonstrates how a system performs a function. In many ways, they
are synergistic as science often provides new tools and ideas for
engineers to use to solve problems.
In the authors’ minds, the roots of some key technological
advancements that exist now can be traced back 50 years to the
original Star Trek TV show. For example, in the show, they used
tricorders to gather data about aliens, equipment failures, medical
problems, and a host of other out of this world challenges. They had
communicators that allowed them to contact crewmembers all over
alien worlds. Finally, they had the replicators that allowed them to
produce any type of food they desired. Today we don’t have tricorders,
but we do have some examples that 50 years ago would have been
amazing. Today there are personal computers, cell phones, 3D printing,
and incredible sensors based on the early transistors of the 1960s. The
Arduino and the Raspberry Pi, two examples of new technology, can be
built into devices similar to the incredibly versatile Star Trek tricorders.
Both Mr. Spock and Scotty realized they needed each other (science
and engineering) to accomplish the goals of exploration and keep the
Enterprise flying safely through space. In today’s complex world,
integrating science and engineering is key to researching problems and
developing solutions.
In the following chapters, the authors will demonstrate all of the
components of STEM needed to research scientific questions, use new
technology (Arduino and Raspberry Pi), employ engineering
techniques, and use mathematics to quantify the scientific data. As Star
Trek boldly went forth to explore new worlds, the authors hope the
students of today do the same!
Acknowledgments
This book would not be possible without the authors’ gaining early
technical insight regarding the Raspberry Pi and Arduino from others.
Jared Brank and Dennis Pate provided a lot of basic information, key
insights, and Arduino hardware early in the process. The authors thank
the following individuals who listened to them on many occasions and
provided help, insight, and inspiration with their own experiences with
the Raspberry Pi and other projects: Jeff Dunehew, Todd Franke, and
Fitz Walker. Additionally, significant assistance with 3D printing was
provided by Mitch Long and David Thoerig.
Producing this book would not have been possible without the
excellent help and guidance regarding scope and early editorial reviews
by Joanna Opaskar and Ed Weisblatt. The authors also utilized many
ideas from Andrew Bradt and Laura Brank’s science fair experience.
Most important was the support and advice from Andrea Bradt.
Table of Contents
Chapter 1:​Key Technology Tools
Arduino Basics
Arduino Setup
Ports and Interfaces
Lessons Learned About the Arduino
Raspberry Pi Basics
Raspberry Pi Setup
Lessons Learned About the Raspberry Pi
Basic Electronics Definitions
Summary
Chapter 2:​Data Logging Basics
Data Logging with the Arduino
Data Logging with the Raspberry Pi
Summary
Chapter 3:​Physics and Mathematics Basics
Temperature
Force
Pressure
Basic Concept of Algebra
Statistical Concepts
Direct Compared to Inferred Measurements
Summary
Chapter 4:​Simple Science and Engineering Projects
Buoyancy of Air
Arduino Buoyancy of Air Version
Raspberry Pi Buoyancy of Air Version
Buoyancy Recap
Demonstrating Pressure
Pressure/​Force Recap
Capturing Counts
Counts Recap
Summary
Chapter 5:​Advanced Physics and Mathematics for Science and
Engineering
Basics Terms of Calculus
How Heat Transfer Works
Conduction Heat Transfer
Convection Heat Transfer
Radiation Heat Transfer
All Three Heat Transfer Mechanisms Work Together!
Mass
Velocity and Acceleration
Inertia
Momentum
Friction
More Advanced Aspects of Calculus
Summary
Chapter 6:​Time/​Condition-Dependent Projects
Conduction Heat Transfer Through an Aluminum Rod
Ensure Consistency in Temperature Sensor Readings
Aluminum Rod Conduction Heat Transfer Recap
Conduction Heat Transfer Through a Window
Window Conduction Heat Transfer Recap
Convection Heat Transfer
Convection Heat Transfer Recap
Zero Gravity Demonstration
Zero Gravity Recap
Measuring Frictional Force Projects
Arduino Frictional Force Project
Operational Schematic
Arduino Frictional Force Recap
Raspberry Pi Frictional Force Project
Raspberry Pi Frictional Force Recap
Acceleration Projects
Acceleration Direct to Computer
Acceleration with Computer Recap
Acceleration Measurement Without a Computer
Acceleration Without Computer Recap
Summary
Chapter 7:​Light and Imaging Projects
Radiation Heat Transfer
Analysis of Heat Transfer
Radiation Heat Transfer Recap
Astrophotography​with the Raspberry Pi Camera
Assembling the Meade ETX-60AT and Raspberry Pi
Astrophotography​Meade ETX-60AT Setup Recap
Assembling the 4 1/​2-Inch Reflector Telescope and the
Raspberry Pi
Components Needed to Assemble the Raspberry Pi 3
Mounting System to the 4 1/​2-Inch Telescope
Reflector Telescope Setup Recap
Basic Raspistill Previewing an Image with the Terminal
Command Line
Using Raspistill to Capture an Image
More Advanced Raspistill Input Without a Keyboard
Raspistill Image Capture Recap
Astrophotography​Raspberry Pi Python GUI
Initiating the GUI
PI_​SN003 Raspberry PI GUI Recap
Assembling the Raspberry Pi and Touchscreen in the Case
Raspberry Pi, Touchscreen, and Case
Modification of the Case and Assembly
Components and Assembly of the Raspberry Pi Case Recap
Camera Modifications, Camera Case, and Power Cables
Camera Modifications
Building the Camera Case
Final Assembly of the Camera in the Case
Power Cord Combination
Camera, Camera Case, and Power Cord Assembly Recap
Building the Shelf for the Meade ETX-60AT
Shelf Components and Assembly Recap
Helpful Hints Using the Telescope and Raspberry Pi
Lessons Learned Recap
Example Images and Enhancing Them Using a Video Capture
GUI
Example Images Taken with the Upgraded Meade ETX-60AT
Astrophotography​System
Recap of Example Images and Enhancement Techniques
Summary
Appendix:​Reference Material
Soldering Safety
General Shop Safety
Manufacturing Techniques
Soldering
Basic Arduino and Raspberry Pi Python Commands
3D Printing
Computer-Aided Design Options
Project Management for Engineering
Decision Analysis for Engineering
Thermal Conductivity Coefficients
Coefficients of Friction
Astronomy Terms
Specifications of the Meade ETX-60AT
Setup, Updates, and Repairs
Helpful Books
Index
About the Authors
Paul Bradt
has a BS in Computer Science from the
University of Houston–Clear Lake. He
currently owns a small business and
writes books, develops code, and does IT
support work. He has experimented with
the Arduino and Raspberry Pi system
and believes them to be excellent tools
for developing an understanding of
electronic components and hardware
interaction in integrated systems. He
believes they are very useful as a
teaching aid in learning computer
programming, science, and engineering.
He likes to perform sophisticated
troubleshooting of computer problems
and has found that online resources can be a great help for novice users
to get their experiments operating quickly and effectively.

David Bradt
has a BS in Mechanical Engineering from New Mexico State University
with many years of experience in the aerospace industry and in the
petrochemical industry. He enjoys building and designing devices to
measure and control systems. He has found the Arduino and Raspberry
Pi to be incredibly powerful little devices that with a little bit of work
can do many different tasks. He is a big fan of Star Trek: The Original
Series and astronomy.
About the Technical Reviewer
Sri Manikanta Palakollu
is an undergraduate student pursuing his bachelor’s degree in
Computer Science and Engineering at SICET under JNTUH. He is a
founder of the OpenStack Developer Community in his college. He
started his journey as a competitive programmer. He always loves to
solve problems that are related to the data science field. His interests
include data science, app development, web development,
cybersecurity, and technical writing. He has published many articles on
data science, machine learning, programming, and cybersecurity in
publications like Hacker Noon, freeCodeCamp, Noteworthy, and DDI
through the Medium platform.
© Paul Bradt and David Bradt 2020
P. Bradt, D. Bradt, Science and Engineering Projects Using the Arduino and Raspberry Pi
https://doi.org/10.1007/978-1-4842-5811-8_1

1. Key Technology Tools


Paul Bradt1 and David Bradt2
(1) Houston, TX, USA
(2) Houston, USA

This chapter will highlight some of the basics about the Arduino and
the Raspberry Pi. It will help the reader get started if they are
unfamiliar with these powerful devices. It is amazing what these
devices can do and this chapter provides some basic aspects for getting
them set up to run.

Arduino Basics
The Arduino is a powerful microcontroller that is ready to program and
acts as an intermediary device between a personal computer and
various sensors. It is relatively new technology that is a great tool for
gaining insight into physical properties and other scientific parameters.
The Arduino board was first developed in Italy in 2004 as a tool to
help train students in programming. It is an open source tool and as
such has developed a large base of helpful web sites and user groups. It
represents a breakthrough as an easy-to-use, relatively inexpensive,
programmable interface between a computer and various sensors. The
software development package and all of the online resources help
make this an ideal data logging tool for science fair/college projects.
The Arduino, Adafruit, SparkFun, Hacktronics, and other web sites
are great places to start. There are also several introductory books to
help the researcher get started using this device. Getting started with
Arduino by Banzi is a very good beginner’s book on Arduino.
Other sources of information for the Arduino novice are maker
faires and user group activities.
There are several versions and sizes, but for the projects in this
book, the Arduino Uno and the Integrated Development Environment
(IDE) version 1.89 were utilized. Figure 1-1 shows an example of the
Arduino Uno. The authors recommend for the person unfamiliar with
Arduinos to use an official version and not a clone. The authors have
never experienced a problem with an official Arduino, but there are
many clones, and the authors have experienced problems with one of
them.

Figure 1-1 Arduino Uno

Arduino Setup
Setting up an Arduino is relatively straightforward; the reader should
follow these basic steps to get the device running:
1. The Arduino is connected to a computer via a USB connection to the
input port (see Figure 1-3).

2. Load code using the IDE (see Figure 1-2).

3. Open the serial monitor to get data.


These steps sound basic, and after the reader completes these steps
a few times, they will see how easy it is to connect and run an Arduino.
In many cases, the challenges occur with the code. If the reader is
copying code from a source, it is important to type it in exactly as it
looks. Even then there could be errors, but that is part of the adventure,
and it’s very rewarding when the code runs.

Figure 1-2 Arduino IDE

Ports and Interfaces


Figure 1-3 shows the main ports of the Arduino Uno.
Figure 1-3 Arduino Ports
There are five primary port groupings that are used to connect to
the Arduino:
Computer port: This is the primary port that is directly connected to
the computer. It is a micro-USB port that powers and enables the
user to upload the sketches or programs to the Arduino.
Battery power port: This port allows an Arduino to be unplugged
from a computer and use battery power to operate. A standard wall
power supply that provides 9–12 V DC can also be used.
Sensor power ports: These plug connections provide 3.3 V and 5 V
DC power. There is also a reset connection and input voltage
connection.
Analog device ports: These connections are for analog inputs.
Digital device ports: These are for digital inputs and outputs.
IDE (Integrated Development Environment): The IDE is the
program that is used to develop the code. It is the programming tool
that runs on a computer and has features to help the developer write
code. The IDE tool must be downloaded from the Arduino web site.
Sketch: The code that runs on an Arduino is called a sketch. Once the
code is developed in the IDE, it is uploaded to the Arduino.
Libraries: These are code modules that are installed on the Arduino
and called up by the program when needed. Libraries add a lot of
functionality and do not require any additional coding.
There are other components and hardware that can be used with
the Arduino:
Shields/breakout boards: These are add-on boards that are either
inserted into the standard Arduino board ports or connected via
wires.
Sensors: A sensor is a device that senses some type of data. It can be
used to directly measure a physical aspect, or it can be used with
some mathematics to infer a physical measurement.
Effectors: An effector imparts some change in the physical world
when activated. Motors, solenoids, and servos are some examples.
LCDs: Liquid Crystal Display can be used to show data.
LEDs: Light-Emitting Diodes or other incandescent lights can also
indicate an event has occurred.

Lessons Learned About the Arduino


The Arduino is relatively easy to use, but the authors found there are a
few key points that will help when using this powerful device:
Each Arduino attaches to a specific com port. The port may have to
be changed or selected in the tools tab under “port” to get the IDE to
recognize the Arduino.
If the code is being pasted into the IDE, do not copy from Microsoft
Word or another word processor. First, put it in a text editor such as
Notepad, Notepad++, or some other C/C++ IDE editor and then copy
it from there. Important note: Notepad and Notepad++ are not
development tools like the IDE. One other very important item of
note is when the code was transcribed into the book format some of
the code text that must be on one line may show up on two lines in
this book. The authors have tried their best to highlight the code that
should be on one line in the IDE by bolding it in the Listing. Please
contact the authors if there are questions at
[email protected].
It is a good idea to test the devices with a basic program to be sure
they work, before moving to a more complex program.
If the final code is complex, get each piece of code working before
adding more modules. This way, it is easier to find the module where
the problem is located.
The authors recommend for long timing events or complex programs
to not use the “delay command,” because it locks the Arduino and
prevents it from doing anything else. Instead, use the “milli
command” that tracks time intervals between events and still allows
other actions to occur. The milli code might be a little more complex,
but it allows the Arduino to perform other functions simultaneously.
Using the delay command for short events or simple programs like
the ones in this book, such as a switch debounce, is recommended.
A feature built into the Arduino IDE is the “auto-format command.” It
can be found under the tools tab or using “Alt+T.” This command
helps identify missing items and also helps organize the code for
improved readability.
One more key aspect of Arduino coding is the “loop command.” There
are a few different types, but common ones such as “void loop” and
the “for command” perform several operations and then repeat them.
Check the wiring twice before applying power. It can be difficult to
see which port a wire is plugged into when there are several wires.
It is hard to know what code is on an Arduino. One easy way that
helps determine what is loaded on an Arduino is saving code with a
descriptive name, date, and even time information. This helps
programmers who may need to go back to a previous code version.
One other very helpful trick is to put the descriptive name of the code
on a piece of tape and stick it on top of the computer port. This helps
when working on, or programing, several different Arduinos.
One of the advantages of the Arduino is that once it is programmed, it
remembers the code. When a power source is plugged into the
battery power port, it will operate the Arduino. According to the
Arduino web site, any power source that can supply 9–12 V DC, 250
mA, or more will work. The plug must be 2.1 mm with the center pin
providing positive voltage and the exterior of the plug the negative
terminal. Some power supplies do not deliver enough current or do
not provide stable power. If an Arduino is behaving strangely, try a
different power supply.
Some programs need special ways to use and communicate with the
Arduino. To do this, the reader should understand these special
connection ports on the Arduino Uno: analog A5 is the SCL (Clock
port) and A4 is the SDA (Data port).

Raspberry Pi Basics
The Raspberry Pi 3 is a powerful minicomputer. This piece of
technology comes with a lot of features like any other modern
computer. It is an experimental/hobbyist device developed around
2011 in the United Kingdom to teach programming. For its low cost, it
has many capabilities and allows the user to configure it in many ways.
There are several models on the market. For this book, the authors
choose the Raspberry Pi 3 Model B V1.2 (Figures 1-4 and 1-5). There is
a new Raspberry Pi 4 that was recently released that has more features.
The authors researched the setup and use of the Raspberry Pi 4, and it
appears to be the same as the Raspberry Pi 3. We believe these projects
will work the same if you have a Raspberry Pi 4.

Figure 1-4 Raspberry Pi


Figure 1-5 Raspberry Pi Ports
Once the Raspberry Pi 3 is up and running, it is just like a normal
personal computer. It has a graphical user interface (GUI) similar to any
computer that enables you to open programs or files with the click of a
mouse. It uses a version of the Linux program for the operating system
(OS) called Debian , so it is a bit of a hobbyist machine and occasionally
may have an issue. There are a lot of online resources to find help.
The Raspberry Pi 3 has a 1.2 GHz 64-bit quad-core CPU, 1 GB RAM,
an integrated wireless connection, four USB ports, an Ethernet port,
and an HDMI connection. It is a truly powerful device for only ≈ $25.
The Raspberry Pi 4 has a 1.4 GHz 64-bit quad core CPU, options of 2, 4,
8 GB RAM and costs from $35 to 75. The Raspberry Pi 4 will run hotter
than the Pi 3 and it is recommended to have a cooling fan but it is faster.

Raspberry Pi Setup
These are the general steps to set up the Pi:
1. Insert the SD card.

2. Plug in the monitor.


3. Plug in the keyboard.

4. Plug in the mouse.

5. Start the system.

The authors recommend that the reader do all their programming


in versions of Python 3.X or later. The exception to this
recommendation is if the reader has legacy code that runs on an earlier
version like Python 2.7.X.
Some projects in this book require additional modules to run. The
“pip” command is typed into the terminal area to install code modules.
The reader should be aware that the pip command installs a module in
the base Python area, which may be specific to Python 2.7.3. If the
reader has upgraded to or is using a newer version of Python, they will
need to use pip3 or Python 3.
Operating the Raspberry Pi is much like a personal computer. It has
a GUI along with several programs such as a spreadsheet, word
processor, and other built-in items. Figure 1-6 provides an example of
the interface.
Figure 1-6 Raspberry Pi GUI with Spreadsheet
For the purposes of this book, the authors will focus primarily on
how to connect sensors to the Raspberry Pi and get data out of them.
There are many other uses for the Raspberry Pi that will not be covered
in this text.
Figure 1-7 shows the General-Purpose Input/Output or GPIO pins,
although it may not be easy to determine the pin number on the
Raspberry Pi. A ribbon cable is also shown that connects to a nice
interface board made by MCM. This interface board has pin numbers
and makes it a lot easier to connect sensors to the Raspberry Pi. More
about this in the next chapter.
Figure 1-7 GPIO Pins on the Raspberry Pi
The GPIO pins include several 5 V, 3.3 V, ground, and input/output
ports.
There are several special ports on the GPIO pins. These are very
important for the Raspberry Pi to communicate via Serial Peripheral
Interface (SPI) protocol with other devices like an analog to digital
converter (ADC). For the Raspberry Pi 3, pin 23 is the GPIO SPI clock
connection; this is also called GPIO11. The next two special connections
are pin numbers 19 and 21. Pin 19 is the data in connection termed
Master Out Slave In (MOSI), also called GPIO10. Pin 21 is the data out
connection termed Master In Slave Out (MISO), also called GPIO9. The
final connection is pin 24 and it is the chip enable (CE0) connection.
There are a lot of confusing descriptions and diagrams on the Internet
regarding these connections, but once the authors understood what
these four connections were used for, it started making sense.
Many resources are available online, and the following books were
helpful in explaining the Raspberry Pi and its features. Beginner’s Guide
to Raspberry Pi published by BDM Publications, Raspberry Pi: The
Complete Manual published by Image Publishing, Learn Raspberry Pi
Programming with Python published by Apress, and The Python Coding
Manual published by BDM Publications are good resources.
The following are some Raspberry Pi terms and definitions:
Another Random Document on
Scribd Without Any Related Topics
the same time, takes all the meanness, the emptiness, the littleness
out of life, covers it with glory, blends it with heaven, expands the
soul, and fills it with hope and joy.

O truth too little known! Religion is not meant to be only a solace


in affliction, a help in temptation, a refuge when the world fails us.
All these it is, but much more. It is the business and employment
of life. It is the task for which we were born. It is the work for
which our life is prolonged from day to day. It is the consecration
of my whole being to God. It is to realize that wherever I am,
whatever I do, I am the child of God, doing His will, and extending
His kingdom on earth. This is the secret of life. This is the meaning
of the world. This is God's way of looking at the world. As He looks
down from heaven, all other distinctions among men vanish,
distinctions of nationality, differences of education, differences of
station, and wealth, and influence, and only one distinction remains
—the distinction between the righteous and the wicked, between
him that serveth God and him that serveth Him not. When we look
at the world, it dazzles us by its greatness, and overpowers us by
its multiplicity. It is so eager and restless. It is so importunate and
overbearing. Here is the secret which disenchants us from its spell.
The world is not for itself. It is not its own end. It is but the field of
human probation. It is but the theatre on which men are exercising
each day their highest faculty, the power of free will. It is the scene
of the great struggle between good and evil, between heaven and
hell, the battle that began when "Michael and his angels fought
with the dragon, and the dragon fought and his angels." [Footnote
64]

[Footnote 64: Apoc. xii. 7]

Into this arena each generation has entered, one after another, to
show their valor. Once the saints of whom we read in the Bible and
the history of the Church were upon the earth, and it was their
turn, and heaven and earth were watching them. They did their
work well. So penetrated were they with the great thought of
eternity that some of them, like Abraham, left home and kindred,
and went out not knowing whither they went; and others, like the
martyrs, gave their hearts' blood for a sacrifice. And there were
others who were not saints, for they were not called to deeds of
heroism, but they were good men, who in simplicity of heart
fulfilled each duty, and served God with clean hands and pure
hearts. And penitents have come in their turn. Once they were
unwise, and the world deceived them, and they followed their own
will, but afterward they turned to God, and redeemed their former
sins by a true penance, and died in the number of those who
overcame the Wicked One. And now it is our turn. There are many
adversaries. All things are ready. The herald has called our name.
And as the primitive martyrs, condemned to the wild beasts in the
amphitheatre, nerved themselves for the encounter by the thought
of the thousand spectators ranged around, so to animate our
courage let us give heed to the sympathizing witnesses who watch
our strife, and who cry to us from heaven and from earth: Be
valiant! Do battle for the right! Acquit you like men! Be strong!

And again, as our Lord's words in the text remind us that we have
an appointed work to do, they remind us also that we have an
allotted time to do it in. All men acknowledge that religion is a
thing to be attended to. But when? Some seem to think that it is
enough to attend to religion at Easter and Christmas, and that at
other times it may be left alone. Some at still more distant
intervals, when the time has been too long, and the number of sins
too great, and the burden on the conscience too heavy. Others
propose to attend to it in the leisure of old age, or just before they
leave this world. And very many imagine that, if a man actually
makes his peace with God at any time before he dies, there is not
much to be regretted. How different is God's intention in this
matter! "Man goeth forth, to his work and to his labor until
the evening." Think of a day-laborer. He rises very early in the
morning, in the winter, long before it is light, and goes off to his
work. He works all day until the evening, pausing only at noon,
when he seeks some hollow in the rock, or the shelter of some
overhanging shrub, to protect him from the cold or the heat, while
he eats his frugal dinner. Now, it is after this pattern that God
wishes us to work out our salvation. The Christian should work
from the morning till the evening, from the beginning of life to the
end of it. There is not a day that God does not claim for his own.
There is not an hour over which He has resigned His sovereignty. A
man who perfectly fulfils his duty begins to serve God early in the
morning. In the morning of life, in early youth, when the dewdrops
sparkle in the sunshine, and the birds sing under the leaves, and
the flowers are in their fresh bloom and fragrance, and every thing
is full of keen enjoyment, there is a low, sweet voice that speaks to
the soul of the happy boy: "My son, give me thy heart." And he
heeds that voice. It is time for first communion, and he has leave
to go. He does not know fully the meaning of the act. It is too
great and deep. But he knows that he is making [a] choice of God.
He knows that God is very near him, and he is very happy. By and
by the time has come for confirmation. The candidates stand
before the bishop, and see, that boy is among the number. He is
changed from what he was. He has grown to be a youth now. He
is more thoughtful and reserved. He knows now what temptation
means; he has seen the shadow of sin; he has caught the tones of
the world's song of pleasure; but he does not waver; he is bold and
resolute for the right, and he is come to fortify himself for the
conflict of life by the special grace of the Almighty. And now time
goes on, and he passes through the most dangerous part of life: he
is a young man, he goes into business, he marries. There are times
of fierce temptation, there are times when the objects of faith seem
all to fade away from his mind, there are times when it seems as if
the only good was the enjoyment of this world, but prayer and
vigilance and a fixed will carry him through, and he passes the
most critical period of life without any grievous stain on his soul.
Thus passes the noonday of his life, and he comes to its decline. It
draweth toward evening. The shadows are getting long. The sun
and the light and the moon are growing dark, and the clouds
return after the rain. He is an old man and feeble, but there he is
with the same heart he gave to God in youth; he has never
recalled the offering. He has been true to his faith, true to his
promises, true to his conscience, and at the hour of death he can
sing his Nunc dimittis, and go to the judgment seat of Christ
humbly but confidently to claim the reward of a true and faithful
servant. Beautiful picture! Life to be envied! A life spent with God,
over which the devil has never had any real power. But you tell me
this is a mere fancy picture; no one lives such a life. I tell you this
is the life God intended you and I should live. There have been
men who have lived such lives, though, indeed, they are not many.
But the number is not so small of those who approximate to it.
Even suppose a man falls into mortal sin, and more than once, all
is not lost. Suppose him, in some hour of temptation, to cast off his
allegiance to God, and in his discouragement to look upon a life of
virtue as a dream; yet, if such a one gathers up his manhood, if in
humble acknowledgment of his sin he returns with new courage to
take his place in the Christian race, such a man recovers not only
the friendship of God, but the merits of his past obedience. There
is a process of restoration in grace as well as in nature. Penance
has power to heal the wounds and knit over the gaps which sin has
made. What does the Holy Scripture say? "I will restore to you
the years which the locust, and the canker-worm, and the
mildew, and the palmer-worm hath eaten." [Footnote 65]

[Footnote 65: Joel ii. 25.]

Many a man's life, which has not been without sin, has yet a
character of continuity and a uniform tending toward God. I believe
there are many who have this kind of perfection. They cannot say,
"I have not sinned," for they have had bitter experience of their
own frailty; but they can say, "I have sinned, but I have not made
sin a law to me. I have not allowed myself in sin, or withdrawn
myself from Thy obedience. I have not gone backward from Thee. I
have fallen, but I have risen again. O Lord, Thou hast been my
hope, even from my youth, from my youth until now, until old age
and gray hairs."
And now, my brethren, if we try our past lives and our present
conduct by the thought of the work we have to do on earth and
the persevering attention we ought to pay to it, do we not find
matter for alarm? and does not our Lord's question convey to us
the keenest reproach? "Why stand ye here all the day idle?" Yes,
idle; that is the word. There is all the difference in the world
between committing a sin in the time of severe temptation, for
which we are afterward heartily sorry, and doing nothing for our
salvation. And is not this our crime, that we are idlers and triflers in
religion? What have our past lives been? What years spent in
neglect, or even in sin? What long periods of utter forgetfulness of
God? What loss of time? What excessive anxiety about this world?
What devotion to pleasure? And are we now really doing any thing
for heaven? Are we really redeeming the past by a true penance?
Are we diligent in prayer, watchful against temptation, watchful of
the company we keep, watchful of the influence we exert, watchful
over our tempers, watchful to fulfil our duties, watchful against
habits of sin? Are we living the lives God intended us to live? Can
we say, "I am fulfilling the requirements of my conscience, in the
standard which I propose to myself?" Ah! is not this our misery,
that we have left off striving? that we are doing nothing, or at least
nothing serious and worthy of our salvation? "Why stand ye all the
day idle?" All the day. Time is going. Time that might have made
us holy, time that has sanctified so many others who set Out with
us in life, is gone, never to return. The future is uncertain; how
much of the day of life is left to us we know not. And graces have
been squandered. No doubt, as long as we live we shall have
sufficient grace to turn to God, if we will; but we know not what
we do, when we squander those special graces which God gives us
now and then through life. The tender heart, the generous purpose
that we had in youth; the fervor of our first conversion; the kind
warnings and admonitions of friends long dead; these have all
passed away. Oh, what opportunities have we thrown away! What
means of grace misused! "Why stand ye all the day idle?" You
cannot say, "No man hath hired us." God has not left you to the
light of natural reason alone, to find out your destiny. In baptism
He has plainly marked out for you your work. And now in
reproachful tones He speaks to your conscience: "Creature of my
hand, whom I made to serve and glorify me; purchase of my
blood, whom I bought to love me; heir of heaven, for whose
fidelity I have prepared an eternal reward, why is it that you resist
my will, withstand your own conscience and reason, despise my
blood, and throw away your own happiness?"

But the words of Christ are not only a reproach, but an invitation.
"Why stand ye here all the day idle?" It is not, then, too late. God
does nothing in vain; and when He calls us to His service, He
pledges himself that the necessary graces shall not be wanting, nor
the promised reward fail. Church history is full of beautiful
instances of souls that, after long neglect, recovered themselves by
a fervent penance. Some even, who are high in the Church's
Calendar of Saints, had the neglect and sin of years upon their
consciences when they began. There is only one unpardonable sin,
and that is to put off conversion until it is too late. As long as God
calls, you can hearken and be saved. To-day, then, once more He
calls. To-day, once more the trumpet-blast of penance sounds in
your ears. Another Lent is coming, a season of penance and prayer.
Prepare yourself for that holy season by examination of your
conscience. Refuse no longer to work in the Lord's vineyard. Offer
no more excuses; make no more delay. Work while it is called to-
day, that when the evening comes, and the Lord gives to the
laborers their hire, you may be found a faithful workman, "that
needeth not to be ashamed."
Sermon X.

The Church's Admonition To The Individual


Soul.

(Ash Wednesday.)

"Take heed to thyself."


—1 Tim. iv. 16.

The services of the Church to-day are very impressive. The matter
of her teaching is not different from usual. The shortness of life,
the certainty of judgment, the necessity of faith and repentance,
are more or less the topics of her teaching at all times of the year.
But this teaching is ordinarily given to the assembled congregation,
to crowds, to multitudes. But to-day she speaks to us as
individuals. She summons us, one by one, young and old, and, as
we kneel before her, she says to us, while she scatters dust on our
foreheads, "Dust thou art, and unto dust thou shalt return." It is in
this individual and personal character of her warning that I find its
special significance and impressiveness. There is no mistaking what
she means. "Remember, O man, that thou art dust, and unto dust
shalt thou return." She separates each one of us from all others,
and gives her message to him in particular. It is an emphatic mode
of conveying St. Paul's admonition to St. Timothy: "Take heed to
thyself."

If we take only the sound of the words, it might seem that no such
admonition was necessary. For, in one sense, men attend to
themselves quite enough. But, in fact, there is more than one self
in a man. There is the self that is made up of our passions, our
failings and disgusts, our comforts and conveniences: this is the
self that speaks so loudly in the heart, and obtrudes itself so
disagreeably on others. This, when indulged, is what we call
selfishness, and this it is which it is one main object of religion to
repress. But there is another self in a man, his true and noble self,
that self which makes him an individual being, which asserts itself
most distinctly in that part of his soul where it comes into closest
contact with God, namely, his conscience. And this self it is very
possible for men to forget. A man may be a priest and have the
care of souls, and be employed in preaching and administering the
sacraments, or he may be a bishop, and live an active life in
governing his church, and yet he may forget himself in this sense.
St. Timothy was a bishop, a sharer in apostolic character and
apostolic gifts, and yet St. Paul did not think it unnecessary to give
him the warning of the text. How must, then, a man forget himself
whose occupation is more secular? Tell me: those eager crowds one
meets with in the streets, hurrying hither and thither, do you think
each one of these realizes that in some sense there is no other in
the world but God and he? Or in a crowded church, on Sunday,
when the preacher, in God's name, is enforcing this duty, or
denouncing that vice, that woman sitting in the pew, that man
standing in the aisle, does he, does she realize that the words are
spoken to them individually, that it is a lesson they are to lay to
heart—to practise? No! I must say what I think, that there are
some who pass through life, from the cradle to the grave, almost
without ever once fully awakening to their own self-consciousness;
to their own individual existence, apart from the world around
them; and their own individual relations to God. A man may even
practise his religion, may know a great deal about it, may talk
about it, may listen to every word of the sermon in the church,
may say his night prayers, may even go through some kind of a
confession and communion, without fully awaking to these things.
Paradoxical as it may seem, I believe that there are not a few men,
who, of all persons in the world of whom they have any
knowledge, are on terms of the slightest and most distant
acquaintance with themselves.

And I will give you one proof that this is true. You know how
troubled many men are in sickness, or on a sleepless night, or in
times of great calamity. Some persons are greatly troubled in a
storm, when the thunder rolls over their heads, and the lightning
flashes in their eyes. Now, of course, nervousness, physical causes,
mental laws, and social considerations, may enter more or less into
the production of this uneasiness, but is there not very often
something deeper than any of these? Is it not something that the
man has done yesterday, or last week, or last year, and that he has
never set right; some unjust transaction, some evil deed, some act
of gross neglect of duty, some miserable passion cherished, some
impure words spoken, some cruelty or shrinking from what is right,
or falsehood, or mischief-making. It is not a matter of imagination.
It is not fancy, but fact. He remembers but too well; he knows
when it was done, and all the consequences of it, every thing
comes up distinctly. He shuts his eyes, but he cannot shut it out.
You know the clock ticks all day long; amid the various cares of the
day you do not hear it, but oh, how distinct and loud it is at night
when your ear catches it. Did you ever have an aching tooth, which
you could just manage to bear during the excitement of the day,
but which began to throb and become intolerable when all was still
at night, and you had gone to bed? So the uneasiness I have
denoted is a real pain of the soul, which we manage to keep down
and forget, or deaden, during our seasons of business and
enterprise, but in hours of loneliness and danger makes itself felt.
And what does this show but that you do not attend to your real
self; that there is some dark corner of your heart in which you fear
to look. You keep the veil down, because you know there is a
skeleton behind it and you are afraid to look at it. And so you go
through life, playing a part, something that you are not, with smiles
on your lips and honeyed words in your mouth, laughing and
jesting, eating and drinking and sleeping, working and trading,
going in and out, paying visits and receiving them, seeking
admiration and flattering others, while all the while, deep down in
your soul, there is that nameless something, that grief like lead in
the bottom of your heart, that wound that you are afraid to probe,
or to uncover, or even to acknowledge.

And now, it is this deceitful way in which men deal with


themselves, this forgetfulness of themselves, that makes death and
judgment so terrible. Death brings out the individuality of the soul
in the most distinct light. Every thing that hides us from ourselves
shall then be removed, every veil and shred torn away, and only
ourselves shall remain. A well-known writer has expressed this in a
few short words: "I shall die alone;" and the same thought is
suggested by the language of the Gospel in reference to the end of
the world: "Two men shall be in the field, one shall be taken and
the other left. Two women shall be grinding at the mill, one shall
be taken and the other left." One shall be taken, and he shall be
taken alone—out of all the surroundings which have enveloped him
here like an atmosphere, and into which he has been fitted like a
long-worn garment. When our first parents heard the voice of the
Lord God calling to them in the garden after the fall, they hid
themselves, and Adam said: "I was afraid, because I was naked,
and I hid myself." So will it be when the soul stands "before God in
its nakedness, ashamed because of its guilty self-consciousness. So
it was with the rich man in our Lord's parable. He lived like the
multitude. He had four brothers, and they were all alike. They had
heard the sermons of Moses and the Prophets, but little did they
think it all concerned them. But at last one of them died, and then
he woke up to himself. His life is all before him. "Thou in thy
lifetime receivedst thy good things." That was the story of it. He
sees it all now: he sees what a glutton, what a proud, hardhearted,
avaricious man he had been; he sees what a creature of sensuality
and self-indulgence he is. Very different is his judgment of himself
now, from what it was when, in his purple robes, he revelled in his
banqueting-hall, the air heavy with perfume, and the table flowing
with silver and flowers, and the slaves bringing in the costly dishes,
while Lazarus, the beggar, sat at his gates, full of sores, and
hungering for the crumbs that fell from his table. And so it will be
with us: awakened to a full consciousness that our relations to God
are the only reality. Stripped of all the circumstances that deceived
and misled and blinded us here; with conscience fully awakened,
with all the consequences of sin open before me and all its guilt
manifest; I shall be brought face to face with myself, with what I
am, with what I have been, with what I have done, with my sins,
and my self-will, and my pride. Yes, this is the real terror of death
and judgment. We think its fearfulness will be in the frowning
Judge, and the throne set amid thunder and lightnings. Oh, no! the
Judge does not frown, He is calm and serene. He sits radiant in
beauty and grace. "When these things begin to come to pass," says
the evangelist, speaking of the signs of the end of the world, "then
look up and lift up your heads, for your redemption draweth nigh."
No! Christ is not transported with anger. He is always the same;
but the way of His coming is different as they to whom He comes
are different. The object is unchanged, but the medium through
which we view it will be different. There shall be an apparition of
terror to the wicked, but it will not be Christ, it will be themselves.
The face of Christ shall be a mirror in which each man shall see
himself. Young man, after your career of vice and profligacy, you
shall see yourself, the moral leper that you are. There the
extortioner, the fraudulent merchant, shall see himself as he is, the
unconvicted thief and robber; there the unfaithful husband or wife
shall see themselves branded with the mark that tells their shame.
The proud woman shall see there the deep stains of her soul in all
their blackness, and her worldly, guilty heart, all laid bare. O sight
of piercing anguish! "O hills and mountains fall on us, and cover us,
and hide us from the wrath of God and of the Lamb." But no, it is
not from the wrath of God and of the Lamb, that we need to be
hidden, it is from ourselves. Which way I fly is hell, myself am hell.
A lost destiny, an existence bestowed in vain. A life passed as a
dream; capacities for happiness never used; graces refused; time
gone; opportunity lost; not merely a law broken, a punishment
inflicted; but I, myself, with my supernatural grace and destiny—I,
with all my lofty hopes and powers—I, ruined and crushed forever:
that is the hopeless, boundless misery. This is the sore affliction of
the guilty after death; and it is the dread of this dismay that keeps
thee trembling all thy life. But, on the other hand, for a man to
face himself, to excite himself to a consciousness of his own
individuality, and to a fulfilment of his own personal obligation to
God, is the way to a peaceful and happy life. The Scripture uses a
notable expression when describing the return of the prodigal: "He
came to himself;" and in our ordinary language, when we wish to
express the idea of a man's seriously reflecting on his destiny and
duty, we say he enters into himself. These expressions are full of
significance. They teach us that something is to be done that no
one can do for us. Others can help us here, but each one for
himself must make his own individual and personal election sure.
Each must go down into his own heart, search out all the dark
corners, repent of its sins, resist its passions, direct its aims and
desires. It is not a work done in a day. It is sometimes a difficult
work. There are times in which it pierces to the very quick of our
sensitive being, but it is the real and only way to true peace. And
oh! it is true and living peace when the soul in its deepest centre is
anchored to God; when nothing is covered over, nothing kept from
His sight. There may be imperfections, there may be sins and
repentances, but there must be, when such a course is habitual, a
true and growing peace. Do not look abroad, my brethren, for your
happiness. It is to be found in yourselves. Happy he who knows
the meaning of that word: "My God and I." This is to walk with
God like Abraham. Of this man the Almighty says, as he did of
Jacob, "I have known thee by thy name." His relations to God are
not merely those general ones that grow out of creation and
redemption: to him God is his life, his very being, the soul of his
soul.

To-day, my brethren, if I have led your thoughts in the direction I


have wished, you see that each one of you has a great work to do,
that he must do himself. It will not do for you that you have had a
pious mother or a good wife. It is not enough that some one
around you, who lives near you, or sits near you in the church, is a
good Christian. It is not enough that you are a Catholic, one of the
vast body of believers in the world. Religion is a personal, individual
thing. All other men in the world may stand or fall: that does not
affect you. Each one of us has his own independent position before
God. If you are one of a family, if you live in a house with others,
or work in a room with many companions, if you are one of a gang
of laborers, or a clerk in an office where many others are
employed, or a scholar in a school where there are many others of
your age, there is a circle around you that separates you from each
one of your companions. If you were to die to-night, your sentence
would be different from that of every other. It might be contrary to
those of all the others. They might be friends of God, and you His
only enemy. And the difference would be not from any outward
cause, but from yourself. "I shall see God," says the prophet,
"whom I myself shall see, and my eyes shall behold and not
another." [Footnote 66] And now, if your conscience tells you that
there is something unsatisfactory in your character, something sinful
in your conduct, it is for you to set it right, and to do it without
delay. It is the first duty of Lent. The forty days of grace and
penance are given for redeeming our sins and saving our souls.
What, then, should be each one's resolution? I will enter into
myself, not we will do this, or I will do it if my friend does, but I,
myself, I will enter into myself. I will ask myself what this strange,
mysterious life of mine in earnest means, and whether I am to-day
advancing to my destiny. I will break off my sins, and I will pray. It
is in prayer that I shall understand my duty. It is in God that I shall
find myself. The solemn words of the Church shall not be uttered in
vain for me: "Thou art dust, and unto dust thou shalt return." How
many have heard that warning and are now no more. The young
have died, the old, the pious, the careless, the rich, and the poor,
and each has gone to his own place, the place and portion fitted to
his deeds and his character. Perhaps it will not be very long before
these words will be verified in me. The Mass shall be said for me,
the holy water sprinkled over my lifeless form. What shall it then
profit me what others have said in my favor or against me? I shall
be simply what I am before God. "What shall it profit a man to
gain the whole world and lose his own soul?" "I shall see
God, whom I myself shall see, and my eyes shall behold
and not another."

[Footnote 66: Job xix. 27.]

NOTE—This appears to be the last sermon which F. Baker wrote. It


was preached on the evening of the Ash-Wednesday before his
death as the first of the Lenten Course of Sermons.
Sermon XI.

The Negligent Christian.

(Third Sunday In Lent.)

"He that is not with Me is against Me;


and he that gathereth not with Me, scattereth."
—St. Luke XI. 23.

There are many seeds planted in the ground that never come up.
There is a great deal of fruit on the trees that never comes to
ripeness. So among Christians there is a great deal of good that
always remains incomplete and inadequate. Who of us has not
seen such? Who of us does not know such? They have some faith,
some religion, but they bring no fruit to perfection. Now, what is
the blight that destroys all their goodness? It is sloth, negligence,
tepidity, call it what you will. Religion influences them, but does not
control them. They do not reject it, but they do not obey it, at least
consistently and in principle. They are languid Christians. They are
not the worst, but they are not good. They seek with eagerness
the pleasures of the world, and make no conscience of avoiding
smaller sins, even when wilful and deliberate. They neglect the
means of grace, prayer, sermons, and sacraments, with but little
scruple, or approach them carelessly. They allow themselves a close
familiarity with evil, dally with temptation, and now and then fall
into mortal sin. So they go through life, conscious that they are
living an unsatisfactory life, but making no vigorous efforts to better
it. It is of such men that I would speak this morning; and I propose
to show how displeasing this negligence of our salvation is to God,
and how dangerous it is to ourselves.

The negligent Christian displeases God because he does not fulfil


the end for which he was created. What is the end for which God
created us? Certainly it is not for ourselves, for before God created
us we were not, and could not have been the end for which He
made us. He must have made us for Himself, for His glory. Yes, this
is the end for which He does every thing, for Himself. From the
very fact that we are created, our end must be to love and serve
God. We are bound, then, to love and serve God, and we are
bound to do it with perfection and alacrity. What kind of creature is
that which renders to God a reluctant and imperfect service?
Suppose a king were to appoint a day to receive the homage of his
subjects, and while he was holding his court, and one after another
was coming forward to kiss his hand or bend the knee, some one,
ill-attired, and with slovenly demeanor, should approach and offer a
heedless reverence. Would it not be taken as an act of contempt
and an offence? Now, God is our King, and He holds a levee every
morning and invites the creation to renew its homage. The world
puts on its best array. The sun comes forth as a bridegroom out of
his chamber, and rejoiceth as a giant to run his course. The
mountains and hills clothe themselves in blue, and the trees put on
their robes of green. The birds sing, and the waters move and
sparkle. Holy and humble men of heart rise from their beds to
enter on their daily course of duty and of prayer, while within the
veil the spirits of the just and the ten thousand times ten thousand
angels bow before the Throne of Him that lives forever. And now in
this great Act of Praise, this ceaseless sacrifice that creation is
offering to its Maker, there comes in the negligent Christian, cold,
distracted, and unprepared to take his part. He does not kneel
down to pray. He goes to work without a blessing. He does not
think of God. Nay, in His very presence says and does unseemly
things. Oh! is he not a blot on the scene? Is not his presence an
offence? In the Old Testament, God complains of the Jewish priests
because they brought to Him the halt and the blind and the sick for
sacrifice. He says: "Offer it now to thy prince, will he be pleased
with it, or will he regard thy face?" [Footnote 67]

[Footnote 67: Mal. i. 8.]

So in like manner, negligent Christian, God complains of you. You


bring to Him a "lame sacrifice," those feet of thine that stumble so
often in the way of justice; a "blind" and "sick sacrifice," that heart
of thine, so fond of the world and so weak in the love of God.

Yes, God requires of us all fervor and perfection—of each one of


us. It is a great mistake to suppose that perfection is required only
of priests or religious; it is required of every one. We are not all
required to seek perfection in the same way. The married seek it in
one way, the unmarried in another. The man of business seeks it
one way, the recluse in another. But everyone is required to seek it
in such way as accords with his state in life. "That is a faithful
servant," says St. Gregory, "who preserves every day, to the end of
his life, an inexhaustible fervor, and who never ceases to add fire to
fire, ardor to ardor, desire to desire, and zeal to zeal." Our own
hearts tell us this when they are really under the influence of the
Spirit of God. Take a man at his first conversion, either to the faith
or to a good life, and how fervent he is! It is not enough for him to
come to Mass always on a Sunday, he will come now and then on a
week-day. It is not enough for him to keep from what is sinful, he
will not allow himself all that is innocent. He does not think of
bargaining with God. This is his thought—that God is All, and he is
a creature, and that God deserves his best, his all. By-and-by, alas!
as he becomes unfaithful, another spirit comes over him. He asks:
"Is this binding under mortal sin? That duty is irksome; is it a great
matter if I omit it now and then?" God tells us what he thinks of
such a man in the parable of the Talents. When the Lord came to
reckon with his servants, he that had received one talent came and
said, "Lord, I know that thou art a hard man, thou reapest
where thou hast not sown, and gatherest where thou hast
not strewed. And being afraid, I went and hid thy talent in
the earth." And his Lord in answer said to him: "Thou wicked
and slothful servant! thou knewest that I reap where I sow
not and gather where I have not strewed. Thou oughtest
therefore to have committed my money to the bankers, and
at my coming I should have received my own with usury.
Cast ye the unprofitable servant into exterior darkness."
[Footnote 68]

[Footnote 68: St. Matt. xxv. 24.]

Again, if fervor in our duties is due to God as our Creator, it is none


the less due to Christ as our Redeemer. Oh, how strong are the
words of St. Paul: "The love of Christ presseth us; judging
this, that if one died for all, then were all dead. And Christ
died for all, that they also that live may not now live to
themselves but to Him who died for them." [Footnote 69]

[Footnote 69: II. Cor. v. 14.]

You see what his idea was—that the love of Christ was a debt that
could never be paid, that it was a claim on us that pressed
continually, and was never satisfied. And surely it is so. When we
think at all, we must all acknowledge that it is so. Who is Christ?
the Son of God, the Splendor of His Father's Glory, and the Image
of His Substance. Who are we? lost sinners. And for us "He did not
abhor the Virgin's womb." He did not refuse "to bear our infirmities,
and carry our sorrows." He gave His body to the smiters, and
turned not away from those that rebuked Him and spat upon Him.
He gave His blood [as] a ransom for many, and laid down His life
for sin. Was there ever love like this? While gratitude lives among
men, what shall be the return given to Christ by those whom He
has redeemed? Is the return we are actually making such as He
deserves? Was it for this that He died, that we should not commit
quite so many mortal sins? Was it for this that He hung on the
cross, that only now and then we should omit some important
duty? Was it for this that He sweat those great drops of blood, that
we should live a slothful and irreligous life? O my brethren, when I
see how men are living; when I look at some Christians, and see
how when Easter comes round it is an even chance whether they
go to their duties or not; when I see them on Sunday stay away
from Mass so lightly, or listen to the word of God so carelessly;
when I see them omit most important duties toward their families;
when I see how freely they expose themselves to temptation, and
how easily they yield to it; when I see how slow they are to prayer,
how cold, sluggish, sensual and worldly they are; above all, when I
hear them give for an answer, when they are questioned about
these things, so indifferently, "I neglected it," I ask myself, Did
these men ever hear of Christ? Do they know in whose name they
are baptized? Did they ever look at a crucifix, or read the story of
the Passion? Alas! yes, they have seen and heard and read, and
have taken their side, if not with Judas in his deceitful kiss, or the
soldiers in their mockery, with the crowd of careless men who
passed by, regardless and hard-hearted. But let these men know
that their Saviour sees and resents their neglect. "Because thou
art lukewarm," He says, "and neither cold nor hot, I will
begin to vomit thee out of my mouth." [Footnote 70] His soul
loathes the slothful and half-hearted. Yes, slothful Christian, far
different will be the estimate thou wilt make of thy life when thou
comest to die, from what thou makest now. Then that negligence
of thine, of which thou makest so little, will seem the crime it really
is; and bitter will be the account thou shalt render of it to Christ
thy Judge.

[Footnote 70: Apoc. iii. 16.]

But if it be not enough to rouse us from our torpor, to think that


we are offending God, let us reflect how great is the danger which
we are bringing on our own souls. A negligent Christian is in very
great danger of being lost. I said just now that he falls into mortal
sins now and then. It is hardly possible it should be otherwise. One
will certainly fall into mortal sin if he does not take pains to avoid
it. We all have within us concupiscence, or a tendency to love the
creature with a disordered love, and this tendency is much
increased in most men by actual sins of their past lives. Now, this
principle acts as a weight on the will, always dragging it down to
the earth. Fervent men make allowance for this. They aim higher
than it is necessary to reach. They leave a margin for failures,
weakness, and surprise. They build out-works to guard the
approaches to the citadel. But with the negligent Christian it is the
contrary of all this. Unreflecting, unguarded, unfortified by prayer,
in his own weakness, and with his strong bent to evil, he must
meet the immediate and direct temptations to mortal sin which
befall him in his daily life. Is not his fall certain? Not to speak of
very strong temptations which can only be overcome by a special
grace, which grace God has not promised to grant except to the
faithful soul—even ordinary temptations are too much for such a
man. He falls into mortal sin almost without resistance.

And what is also to be taken into the account is, that the difference
between mortal and venial sin is often a mere question of more or
less. So much is a mortal sin: so much is not. The line is often very
difficult, nay, impossible to be drawn, even by a theologian. Now,
who can tell us in practice when we have arrived at the limit of
venial sin, when we have passed beyond it and are in mortal sin?
Will not a careless, thoughtless man, such as I have described, will
he not be certain sometimes to go over the fatal line? Yes, my
brethren, negligent Christians commit mortal sins. They commit
mortal sins almost without knowing it. They commit mortal sins
oftener than they imagine. Without opposing religion, without
abandoning themselves to a reprobate life, just by neglecting God
and their duties, they fall into grievous sins; bad habits multiply
upon them apace, their passions grow stronger, grace grows
weaker, their good resolutions less frequent and less hopeful, until
they are near to spiritual ruin. The wise man gives us in a striking
picture the description of such a soul: "I passed by the field of
the slothful man and by the vineyard of the foolish man:
And behold, it was all filled with nettles, and thorns had
covered the face thereof: and the stone wall was broken
down, which when I had seen, I laid it up in my heart, and
by the example I received instruction. Thou will sleep a
little, said I: thou will slumber a little: thou will fold thy
hands a little to rest: And poverty shall come upon thee as
one that runneth, and want as an armed man." [Footnote 71]

[Footnote 71: Proverbs xxiv. 30.]

And what is to secure you from dying in such a state? Our Lord
says, "If the master of the house had known in what hour
the thief would come, he would have watched, and would
not have suffered his house to be broken open." [Footnote
72]

[Footnote 72: Matt. xxiv. 43.]

But he knew not, and so in the dead of night, when deep sleep
falleth on man, the thief came. And so it is with death. It comes
like a thief in the night. Death is almost always sudden. Sometimes
it comes without any warning at all. A man is sent into eternity in a
moment, without time to utter a prayer. Sometimes it comes after
sickness, but sickness does not always prepare for death. The sick
man says: "Oh, it is nothing; I shall soon be well." His friends say
the same. If he gets worse the priest is sent for; he would like to
receive the sacraments. But too often he has not yet looked Death
in the face, he has not heard the dreadful truths he has to tell, he
is much as he was in life, slothful and negligent. And after the
priest is gone, when he is alone, at midnight, that comes to pass of
which he has thought so little. Death enters the room, and with his
icy hand unlocks the prison of the body, whispering to the soul with
awful voice, "Arise, and come to judgment." O my brethren, how
dreadful, if at that hour you find yourself unready! If like the foolish
virgins you are forced to cry: "Our lamps are gone out." "Cursed
is he that doeth the work of the Lord negligently," [Footnote
73] saith the Holy Scripture. The work of the Lord is the work of
our salvation. That is the work of our life, the work for which we
are created, and he, who through negligence leaves this work
undone, shall hear at the last that dreadful sentence: "Depart ye
cursed."

[Footnote 73: Jer. xlviii. 10.]

We come back, then, to this truth, that the only way to secure our
salvation is to be not slothful in that business, but fervent in spirit,
serving the Lord. Salvation is a serious work. We are not sufficiently
aware of this. We seem somehow to have got in the belief that the
way of life is not strait, and the gate not narrow. Certainly we feel
very differently about our salvation from what our fathers in the
Catholic Church felt. How many have gone out into the desert and
denied themselves rest and food, and scourged themselves to
blood! How many have devoted themselves to perpetual silence!
How many have willingly given up wealth and friends and kindred!
How many, even their own lives! Will you tell me they were but
seeking a more perfect life? they were but following the counsels
of perfection, which a man is free to embrace or decline? I tell you
they were seeking their salvation. They were afraid of the
judgment to come, and were trying to prepare for it. "Whatever I
do," says St. Jerome, "I always hear the dreadful sound of the last
trumpet: 'Arise, ye dead, and come to judgment.'" Now, can
salvation be a work so serious to them and so trivial for us? Grant
that yon are not bound to do precisely what they did, are you at
liberty to do nothing? If you are not bound to a perpetual fast, are
you at liberty to darken your mind and inflame your passions by
immoderate drinking? If yon are not required to walk with
downcast eyes and to observe perpetual silence, are you free to
gaze on every dangerous object, and to speak words of profanity,
falsehood, impurity, or slander? If you are not required to flee from
your homes, are you not required to forsake the occasions of sin?
If you are not called to forego all innocent pleasures, are you
exempt from every sort of self-denial? If no rule obliges you to
spend the night in prayer, are you not obliged to pray often? Yes, it
was the desire to place their salvation in security that led our
fathers into the desert. Surely, we have to work out our salvation
with fear and trembling, who remain behind in a world which they
left as too dangerous, and have to contend with passions which
they felt wellnigh too strong for them. We must be what they were.
"The time is short: it remaineth that they who have wives
be as those who have not; and they who weep as they who
weep not; and they who rejoice as they who rejoice not;
and they who buy as they who possess not; and they who
use this world as if they used it not; for the figure of this
world passeth away." [Footnote 74]

[Footnote 74: I. Cor. vii. 29, 30.]

My brethren, then be earnest in the work of your salvation. While


we have time let us do good, and abound in the work of the Lord.
Serve the Lord with a perfect heart. He deserves our very best. Our
own happiness, too, will be secured by it, for He says: "Take My
yoke upon you, and learn of Me, and you shall find rest to
your souls." [Footnote 75] And to the fervent: "An entrance
shall be ministered abundantly into the everlasting
kingdom of Jesus Christ." [Footnote 76]

[Footnote 75: Matt. xi. 29.]

[Footnote 76: II. Pet. i. 11.]

This is my desire for you, to see you fervent Christians. I would like
to know that you are anxious to assist at the Holy Mass on week-
days as well as on Sundays. I would like to know that you pray
morning and evening. I would like to believe that you speak with
God often as the day goes on. I would like to know that you are
watchful over your lips for fear of giving offence with your tongue;
that you are prompt to reject the first temptations to evil; that you
are exact in the fulfilment of your duties; that you are careful in
confession, and devout at communion—in a word, that you are
living a life of watchfulness against the coming of Christ to
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like