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

Programming Microcontrollers with Python: Experience the Power of Embedded Python 1st Edition Armstrong Subero download

The document is a promotional overview of the book 'Programming Microcontrollers with Python: Experience the Power of Embedded Python' by Armstrong Subero, which is available for download. It includes links to other related programming books and provides information about the book's content, structure, and authorship. The book covers various aspects of microcontroller programming using Python, including setup, electronics, embedded systems, and Python programming techniques.

Uploaded by

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

Programming Microcontrollers with Python: Experience the Power of Embedded Python 1st Edition Armstrong Subero download

The document is a promotional overview of the book 'Programming Microcontrollers with Python: Experience the Power of Embedded Python' by Armstrong Subero, which is available for download. It includes links to other related programming books and provides information about the book's content, structure, and authorship. The book covers various aspects of microcontroller programming using Python, including setup, electronics, embedded systems, and Python programming techniques.

Uploaded by

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

Programming Microcontrollers with Python:

Experience the Power of Embedded Python 1st


Edition Armstrong Subero download

https://textbookfull.com/product/programming-microcontrollers-
with-python-experience-the-power-of-embedded-python-1st-edition-
armstrong-subero-2/

Download more ebook from https://textbookfull.com


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

Programming Microcontrollers with Python: Experience


the Power of Embedded Python 1st Edition Armstrong
Subero

https://textbookfull.com/product/programming-microcontrollers-
with-python-experience-the-power-of-embedded-python-1st-edition-
armstrong-subero-2/

Programming PIC Microcontrollers with XC8 1st Edition


Armstrong Subero

https://textbookfull.com/product/programming-pic-
microcontrollers-with-xc8-1st-edition-armstrong-subero/

Programming with MicroPython Embedded Programming with


Microcontrollers and Python 1st Edition Nicholas H.
Tollervey

https://textbookfull.com/product/programming-with-micropython-
embedded-programming-with-microcontrollers-and-python-1st-
edition-nicholas-h-tollervey/

Programming with MicroPython embedded programming with


Microcontrollers and Python First Edition Nicholas H.
Tollervey

https://textbookfull.com/product/programming-with-micropython-
embedded-programming-with-microcontrollers-and-python-first-
edition-nicholas-h-tollervey/
MicroPython for the Internet of Things: A Beginner’s
Guide to Programming with Python on Microcontrollers
2nd Edition Bell

https://textbookfull.com/product/micropython-for-the-internet-of-
things-a-beginners-guide-to-programming-with-python-on-
microcontrollers-2nd-edition-bell/

Learning Scientific Programming with Python 1st Edition


Christian Hill

https://textbookfull.com/product/learning-scientific-programming-
with-python-1st-edition-christian-hill/

Introduction to Scientific Programming with Python


Joakim Sundnes

https://textbookfull.com/product/introduction-to-scientific-
programming-with-python-joakim-sundnes/

Programming with Python for Social Scientists 1st


Edition Phillip Brooker

https://textbookfull.com/product/programming-with-python-for-
social-scientists-1st-edition-phillip-brooker/

Learning Scientific Programming With Python 2nd Edition


Christian Hill

https://textbookfull.com/product/learning-scientific-programming-
with-python-2nd-edition-christian-hill/
Programming
Microcontrollers
with Python
Experience the Power of
Embedded Python

Armstrong Subero
Programming
Microcontrollers with
Python
Experience the Power
of Embedded Python

Armstrong Subero
Programming Microcontrollers with Python: Experience the Power of
Embedded Python
Armstrong Subero
Basse Terre, Moruga, Trinidad and Tobago

ISBN-13 (pbk): 978-1-4842-7057-8 ISBN-13 (electronic): 978-1-4842-7058-5


https://doi.org/10.1007/978-1-4842-7058-5

Copyright © 2021 by Armstrong Subero


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

Chapter 1: Getting Ready����������������������������������������������������������������������1


Introduction to Microcontrollers����������������������������������������������������������������������������1
Firmware, Memory, and Clock Speed��������������������������������������������������������������������3
8-Bit vs. 32-Bit������������������������������������������������������������������������������������������������������4
Microcontroller Programming Languages�������������������������������������������������������5
Assembly Language����������������������������������������������������������������������������������������������5
C����������������������������������������������������������������������������������������������������������������������������6
C++�����������������������������������������������������������������������������������������������������������������������6
BASIC��������������������������������������������������������������������������������������������������������������������7
Rust�����������������������������������������������������������������������������������������������������������������������7
Python�������������������������������������������������������������������������������������������������������������������8
Selecting a Development Board����������������������������������������������������������������������������9
Adafruit Metro M0 Express���������������������������������������������������������������������������������10
Adafruit Feather M0 Express������������������������������������������������������������������������������12
Adafruit Metro M4 Express���������������������������������������������������������������������������������13
Adafruit Grand Central M4 Express���������������������������������������������������������������������14
The Arduino Zero�������������������������������������������������������������������������������������������������15

v
Table of Contents

The STM32F746ZG Nucleo����������������������������������������������������������������������������������16


Device Comparison���������������������������������������������������������������������������������������������17
The Component List��������������������������������������������������������������������������������������������18
The Mu Editor������������������������������������������������������������������������������������������������������21
Other Serial Communication Tools����������������������������������������������������������������25
Setting Up Your Own Board���������������������������������������������������������������������������������29
Conclusion����������������������������������������������������������������������������������������������������������35

Chapter 2: Electronics Primer������������������������������������������������������������37


Electrical Wires���������������������������������������������������������������������������������������������������40
The Breadboard��������������������������������������������������������������������������������������������������42
Electronic Schematics�����������������������������������������������������������������������������������44
Passive Components�������������������������������������������������������������������������������������������48
Resistors�������������������������������������������������������������������������������������������������������������48
Capacitors�����������������������������������������������������������������������������������������������������������51
Polarized Capacitors�������������������������������������������������������������������������������������������52
Non-polarized Capacitors�����������������������������������������������������������������������������������53
Capacitor Schematic Symbols�����������������������������������������������������������������������54
Inductors�������������������������������������������������������������������������������������������������������������55
Semiconductors��������������������������������������������������������������������������������������������������57
Diode�������������������������������������������������������������������������������������������������������������59
Light-Emitting Diode�������������������������������������������������������������������������������������������60
Transistor������������������������������������������������������������������������������������������������������������61
Metal-Oxide-Semiconductor Field-Effect Transistors�����������������������������������������64
Integrated Circuits�����������������������������������������������������������������������������������������66
Digital Logic���������������������������������������������������������������������������������������������������67
Logic Level Conversion���������������������������������������������������������������������������������������70

vi
Table of Contents

Flip-Flop��������������������������������������������������������������������������������������������������������������72
Registers and the Shift Register�������������������������������������������������������������������������73
Multiplexers and Demultiplexers������������������������������������������������������������������������75
Conclusion����������������������������������������������������������������������������������������������������������76

Chapter 3: Embedded Systems Overview�������������������������������������������77


An Overview of Embedded Systems�������������������������������������������������������������������77
Microcontroller vs. Application Processor����������������������������������������������������������78
Embedded Systems Structure����������������������������������������������������������������������������79
The Hardware System�����������������������������������������������������������������������������������������82
The Software System������������������������������������������������������������������������������������������83
The Toolchain������������������������������������������������������������������������������������������������������84
Software Testing�������������������������������������������������������������������������������������������������85
Embedded Software Architecture�����������������������������������������������������������������������86
The Driver Layer��������������������������������������������������������������������������������������������������87
Hardware Abstraction Layer (HAL)����������������������������������������������������������������������88
Board Support Package (BSP)�����������������������������������������������������������������������������88
Middleware���������������������������������������������������������������������������������������������������������89
Software Framework������������������������������������������������������������������������������������������90
Code Generator���������������������������������������������������������������������������������������������������92
Platform��������������������������������������������������������������������������������������������������������������92
Embedded Systems Constraints�������������������������������������������������������������������������93
Cost���������������������������������������������������������������������������������������������������������������������93
Performance�������������������������������������������������������������������������������������������������������94
Energy Budget�����������������������������������������������������������������������������������������������������95
Embedded Systems Classification����������������������������������������������������������������������96
Small-Scale Systems������������������������������������������������������������������������������������������96

vii
Table of Contents

Medium-Scale Systems��������������������������������������������������������������������������������������97
High-Performance Systems��������������������������������������������������������������������������������98
Distributed Embedded Systems��������������������������������������������������������������������������99
Seven Steps to Developing an Embedded Product�������������������������������������������100
Step 1: Idea Creation�����������������������������������������������������������������������������������100
Step 2: Requirements Specifications�����������������������������������������������������������100
Step 3: Functional Design����������������������������������������������������������������������������101
Step 4: Rapid Prototyping����������������������������������������������������������������������������101
Step 5: Testing���������������������������������������������������������������������������������������������102
Step 6: Securing Your System���������������������������������������������������������������������103
Step 7: Bringing to Market���������������������������������������������������������������������������104
Conclusion��������������������������������������������������������������������������������������������������������105

Chapter 4: Python Programming������������������������������������������������������107


Writing Python Programs����������������������������������������������������������������������������������107
Whitespace�������������������������������������������������������������������������������������������������������110
Comments���������������������������������������������������������������������������������������������������������110
Variables and Constants�����������������������������������������������������������������������������������111
Data Types���������������������������������������������������������������������������������������������������������114
Operators����������������������������������������������������������������������������������������������������������115
Lists������������������������������������������������������������������������������������������������������������������116
Tuples����������������������������������������������������������������������������������������������������������������116
If Statement������������������������������������������������������������������������������������������������������117
else Statement��������������������������������������������������������������������������������������������������117
elif Statement���������������������������������������������������������������������������������������������������118
short if���������������������������������������������������������������������������������������������������������������118
for Loop�������������������������������������������������������������������������������������������������������������119
while Loop���������������������������������������������������������������������������������������������������������119

viii
Table of Contents

Functions����������������������������������������������������������������������������������������������������������120
Lambda Functions���������������������������������������������������������������������������������������������120
Exception Handling�������������������������������������������������������������������������������������������121
Object-Oriented Programming��������������������������������������������������������������������������121
Random and Time���������������������������������������������������������������������������������������������123
Python vs. CircuitPython�����������������������������������������������������������������������������������124
How Does My Python Program Run?����������������������������������������������������������������124
Conclusion��������������������������������������������������������������������������������������������������������125

Chapter 5: Digital Control�����������������������������������������������������������������127


I/O Pins��������������������������������������������������������������������������������������������������������������127
Output and Input on Microcontroller Hardware������������������������������������������������128
Going Deeper into Microcontroller I/O���������������������������������������������������������������132
Using Output: Lighting an LED��������������������������������������������������������������������������135
LED Control��������������������������������������������������������������������������������������������������136
Building the Circuit��������������������������������������������������������������������������������������136
Lighting an LED with CircuitPython�������������������������������������������������������������139
Blinking an LED�������������������������������������������������������������������������������������������������141
Using Input: Adding a Pushbutton���������������������������������������������������������������������143
Pull-Up vs. Pull-Down Resistors������������������������������������������������������������������143
Switch Debouncing��������������������������������������������������������������������������������������146
Input with MCU Schematic (Pull-Up)�����������������������������������������������������������147
Pushbutton Pull-Up Circuit Connection Tips������������������������������������������������������148
Pushbutton Pull-Up with CircuitPython Program�����������������������������������������150
Input with MCU Schematic (Pull-Down)������������������������������������������������������152
Pushbutton Pull-Down Circuit Connection Tips�������������������������������������������153
Pushbutton Pull-Down with CircuitPython Program������������������������������������155
Conclusion��������������������������������������������������������������������������������������������������������157

ix
Table of Contents

Chapter 6: Data Conversion��������������������������������������������������������������159


Analog to Digital Conversion�����������������������������������������������������������������������������159
ADC Hardware���������������������������������������������������������������������������������������������������161
Going Deeper into ADC��������������������������������������������������������������������������������������163
The Potentiometer���������������������������������������������������������������������������������������������164
Analog to Digital Conversion in CircuitPython���������������������������������������������������169
ADC with MCU Schematic���������������������������������������������������������������������������������169
ADC Circuit Connection Tips������������������������������������������������������������������������������170
CircuitPython with Potentiometer Program�������������������������������������������������������171
Photoresistor�����������������������������������������������������������������������������������������������������173
Photoresistor with MCU Schematic������������������������������������������������������������������174
Photoresistor Circuit Connection Tips���������������������������������������������������������������175
Photoresistor with CircuitPython Program��������������������������������������������������������176
Temperature Sensor������������������������������������������������������������������������������������������178
Temperature Sensor with MCU Schematic�������������������������������������������������������180
Temperature Sensor Circuit Connection Tips����������������������������������������������������181
Temperature Sensor with CircuitPython Program���������������������������������������������182
Conclusion��������������������������������������������������������������������������������������������������������184

Chapter 7: Communication Protocols�����������������������������������������������185


Microcontroller Communications����������������������������������������������������������������������185
USART Communications�����������������������������������������������������������������������������������186
Deeper into UART����������������������������������������������������������������������������������������������189
UART in CircuitPython���������������������������������������������������������������������������������������190
USB-UART with MCU Schematic�����������������������������������������������������������������������190
MCU with USB-UART Circuit Connection Tips���������������������������������������������������191
UART with CircuitPython Program���������������������������������������������������������������������193

x
Table of Contents

SPI Communications�����������������������������������������������������������������������������������������194
Deeper into SPI�������������������������������������������������������������������������������������������������196
SPI Circuit Connection���������������������������������������������������������������������������������������197
SPI with CircuitPython Program������������������������������������������������������������������������197
I2C Communications�����������������������������������������������������������������������������������������199
Deeper into I2C�������������������������������������������������������������������������������������������������200
I2C Support in CircuitPython�����������������������������������������������������������������������������201
The MPU6050����������������������������������������������������������������������������������������������������201
I2C with MCU Schematic�����������������������������������������������������������������������������������202
I2C Circuit Connection Tips�������������������������������������������������������������������������������203
I2C with CircuitPython Program������������������������������������������������������������������������204
Adding Libraries������������������������������������������������������������������������������������������������206
MPU6050 with CircuitPython Program��������������������������������������������������������������206
Conclusion��������������������������������������������������������������������������������������������������������208

Chapter 8: Display Interfacing����������������������������������������������������������209


The Liquid Crystal Display���������������������������������������������������������������������������������209
Using a GLCD����������������������������������������������������������������������������������������������������211
Monochrome GLCD Schematic��������������������������������������������������������������������������213
PCD8544 with CircuitPython�����������������������������������������������������������������������������215
Troubleshooting������������������������������������������������������������������������������������������������218
The Framebuffer�����������������������������������������������������������������������������������������������220
OLED�����������������������������������������������������������������������������������������������������������������222
Using an OLED���������������������������������������������������������������������������������������������������224
MCU with OLED Schematic�������������������������������������������������������������������������������225
CircuitPython with OLED Program���������������������������������������������������������������������227
Conclusion��������������������������������������������������������������������������������������������������������230

xi
Table of Contents

Chapter 9: Controlling DC Actuators�������������������������������������������������231


DC Motors���������������������������������������������������������������������������������������������������������231
Driving DC Motors���������������������������������������������������������������������������������������������232
Pulse Width Modulation������������������������������������������������������������������������������������235
PWM in CircuitPython����������������������������������������������������������������������������������������237
PWM with CircuitPython Program���������������������������������������������������������������������237
Controlling Motor Speed�����������������������������������������������������������������������������������238
The H-Bridge�����������������������������������������������������������������������������������������������������239
H-Bridge with MCU Schematic�������������������������������������������������������������������������242
H-Bridge with CircuitPython Program���������������������������������������������������������������245
Servo Motors�����������������������������������������������������������������������������������������������������247
Servo Motors in CircuitPython��������������������������������������������������������������������������249
Servo Motor with MCU Schematic��������������������������������������������������������������������249
Servo Motor with CircuitPython Program����������������������������������������������������������251
Stepper Motors�������������������������������������������������������������������������������������������������252
Stepper Motors in CircuitPython�����������������������������������������������������������������������256
Stepper Motor with MCU Schematic�����������������������������������������������������������������256
Stepper Motor with CircuitPython Program������������������������������������������������������258
Conclusion��������������������������������������������������������������������������������������������������������261

Chapter 10: Python MCU Interfacing������������������������������������������������263


RGB LED������������������������������������������������������������������������������������������������������������263
RGB LED with MCU Schematic��������������������������������������������������������������������������264
RGB LED Circuit Connection Tips����������������������������������������������������������������������265
Libraries We’ll Need������������������������������������������������������������������������������������������266
RGB LED with CircuitPython Program���������������������������������������������������������������266
HC-SR04������������������������������������������������������������������������������������������������������������268

xii
Table of Contents

HC-SR04 with MCU Schematic�������������������������������������������������������������������������270


HC-SR04 Circuit Connection Tips����������������������������������������������������������������������270
Libraries We’ll Need������������������������������������������������������������������������������������������271
HC-SR04 with CircuitPython Program���������������������������������������������������������������272
Piezo Speaker���������������������������������������������������������������������������������������������������274
Piezo with MCU Schematic�������������������������������������������������������������������������������274
Piezo Circuit Connection Tips����������������������������������������������������������������������������275
Libraries We’ll Need������������������������������������������������������������������������������������������276
Piezo with CircuitPython Program��������������������������������������������������������������������276
DHT11���������������������������������������������������������������������������������������������������������������277
DHT11 with MCU Schematic�����������������������������������������������������������������������������278
DHT11 Sensor Circuit Connection Tips��������������������������������������������������������������279
Libraries We’ll Need������������������������������������������������������������������������������������������280
DHT11 Sensor with CircuitPython Program������������������������������������������������������280
Conclusion��������������������������������������������������������������������������������������������������������283

Index�������������������������������������������������������������������������������������������������285

xiii
About the Author
Armstrong Subero started learning electronics at the age of 8. One of
the happiest memories in his childhood was when he finally figured out
how to make a light bulb. It took off from there as he taught himself more
advanced topics in electronics, before delving into computer architecture,
and eventually discovering the joys of microcontrollers and FPGAs.
He currently works for the Ministry of National Security in his country;
writes software; designs circuits, courses, and robots; writes books; and
blogs about technology on www.trinirobotics.com in his free time.
He is also a contributing author to Free Code Camp and has degrees in
Computer Science and Liberal Arts and Sciences from Thomas Edison
State University. He is the author of Programming PIC Microcontrollers
with XC8 and Codeless Data Structures and Algorithms both published by
Apress Media LLC.

xv
About the Technical Reviewer
Sai Yamanoor is an embedded systems engineer working for an industrial
gases company in Buffalo, NY. His interests, deeply rooted in DIY and
open source hardware, include developing gadgets that aid behavior
modification. He has published two books with his brother, and in his
spare time, he likes to contribute to build things that improve quality of
life. You can find his project portfolio at http://saiyamanoor.com.

xvii
Acknowledgments
I want to thank my family.
I want to thank everyone who ever said anything positive to me or
taught me something. I heard it all, and it meant something.
I want to thank God most of all, because without God I wouldn’t be
able to do any of this.

xix
CHAPTER 1

Getting Ready
You have decided to learn about microcontrollers using Python. While it
would be nice to jump straight into developing cool stuff, there are a few
steps you must take to get ready first. If you have experience with software
development, you may be accustomed to just opening an editor and typing
code right away. However, microcontroller development is a little more
involved than that. After all, you will be writing programs for a separate
computer, so there is a lot more to set up. A microcontroller development
environment consists of not only software but an entire hardware
ecosystem that must be understood to unlock all the magic these devices
have to offer.
In this chapter, we will look at setting up an environment for
development. By the end of the chapter, you will be ready to select a
microcontroller board, and you’ll have the software tools and hardware
devices needed to begin your development with CircuitPython. Let’s get
started!

I ntroduction to Microcontrollers
In our modern world, computers are ubiquitous. They have become
smaller, easier to use, and more integrated into our daily lives. A few years
ago, to connect to the Internet and check your email, you would have
had to sit down at a large desktop device. Today, you can do the same
thing with a computer that fits in the palm of your hand and places all the
information in the world at your fingertips.
© Armstrong Subero 2021 1
A. Subero, Programming Microcontrollers with Python,
https://doi.org/10.1007/978-1-4842-7058-5_1
Chapter 1 Getting Ready

The advancements in technology that brought us smartphones and


tablets have given billions of people access to computers. However, these
handheld devices aren’t the only computers that exist. What if I told you
that the billions of smartphones in use pale when compared to another
kind of computing device that silently surrounds us? In fact, there are
probably a half dozen or more of these devices in the room with you right
now. These miniature computers are called microcontrollers, or MCUs, and
they can be found all around us.
Microcontrollers are small, intelligent, programmable computers that
we use to perform tasks that are repetitive or that require some level of
intelligent control without the need for human interaction. Microcontroller
devices have a fraction of the computing power of a device like your
smartphone or tablet, but they have many, many uses. Any device around
you that reacts to a button press, displays information, or makes sounds
when something is wrong is most likely controlled by a microcontroller.
From calculators to TVs to microwaves and dishwashers, almost every
household device you can think of contains a microcontroller.
If you are familiar with computers, you are sure to have heard of a
central processing unit (CPU) or a microprocessor: the brain behind your
computer. A microprocessor lets a computer perform many functions. One
day you might use your computer to type a document, the next to stream
your favorite movie, and so on. The microprocessor has a lot of supporting
circuitry, including memory and input and output chips, that allows it to
carry out all these tasks. These are usually part of the motherboard that
houses the microprocessor.
A microcontroller takes all the supporting chips that are required to
make a microprocessor work and places them on a single chip. This is
why a microcontroller is called a single-chip computer. A microcontroller
still operates like the microprocessor, but it is designed to only do
a single task and to do it as efficiently as possible. For this reason, a
microcontroller chip contains the minimum amount of processing power
required to do its task.

2
Chapter 1 Getting Ready

Firmware, Memory, and Clock Speed


Like general-purpose computers, microcontrollers work by running
programs. Because microcontrollers perform limited functions, the
programs written for them are not expected to change frequently. For that
reason, programs written for microcontrollers are called firmware. This
firmware is usually stored as a binary file (with a .bin file extension) or a
hex file which is a text-represented binary file (having a .hex file extension);
this file contains the memory content that is written on flash, and thus
it is ready to be run on the microcontroller. A special device called a
programmer loads this binary file into the microcontroller’s memory.
The memory consists of two parts: the main memory (sometimes
called program memory) and the random-access memory (RAM,
sometimes called data memory). The main memory is nonvolatile,
whereas RAM is volatile. This means that when the microcontroller is not
powered, the information contained in RAM will disappear, whereas the
information in the main memory will be retained. For this reason, the
main memory is also called read-only memory (ROM). Its contents are
designed to be mainly read, whereas RAM is designed to have its contents
changed by the user during runtime.
In a general-purpose computer system, usually a program is loaded
into RAM before it is executed. Microcontroller systems are a bit different.
In a microcontroller, the firmware is executed directly from ROM, and
RAM is used to do things such as to store temporary information that
aids in running the firmware (these are usually runtime variables and can
contain a stack or a heap, special memory structures).
Some microcontroller devices can have their ROM contents
programmed into them from the factory and cannot be changed by
the end user once they are put into a device. These are called one-­
time programmable (OTP) devices, and they are cheaper and easier to
manufacture. Usually though, the ROM is made of flash memory, meaning
that it can be programmed and changed after manufacturing.

3
Chapter 1 Getting Ready

Flash memory lets you program a device thousands of times, making


it useful for learning and product prototyping. If errors show up in
your firmware program, flash also allows you to fix errors by means of
an update, a process called patching. Updates usually take the form of
over-the-air (OTA) updates, which change the contents of the ROM via a
wireless connection. OTA updates are common for Internet of Things (IoT)
devices. Alternately, you can connect the device to a computer with a cable
to update the firmware.
A microcontroller executes the instructions in its firmware program
according to the speed of a clock that runs the device. The speed is
measured in hertz, or cycles per second. The faster the clock speed, the
faster the device will execute instructions. Microcontroller clock speeds
typically range from about 1 MHz (though for extremely low-cost, low-­
power applications, the clock speed can run as low as 32.768 kHz to about
and for fast systems up to 1 GHz.)

8-Bit vs. 32-Bit


The devices we will use in this book are quite powerful. They consist of a
32-bit microprocessor core which means that the number of bits of data
that can be processed by the microcontroller is comprised of 32 registers (a
register is a small storage location for data within the microcontroller; we’ll
talk about this more in the next chapter). For a long time, however, 8-bit
devices ruled the microcontroller market.
Historically, 32-bit devices were expensive and hard to program. Due
to advances in technology, the cost of 32-bit devices has been declining
to the point of where they can rival 8-bit devices for all but extremely
cost-sensitive applications. Meanwhile, thanks to the myriad of tools now
available to use with them, 32-bit devices have become amazingly easy
to program and control. While 8-bit microcontrollers are still alive and
relevant, a lot of their market share is being replaced by 32-bit devices.

4
Chapter 1 Getting Ready

For beginners, 32-bit devices are an especially useful learning tool


because they contain more memory and have greater memory addressing
capabilities. This allows for a higher level of abstraction, meaning
it is typically easier to program a 32-bit device without a thorough
understanding of its inner workings. By contrast, since 8-bit devices
have less processing power and memory, you need to have a deeper
understanding of the internals of the device to better manage memory
resources and write effective programs.

Microcontroller Programming Languages


In this section, we will look at some of the languages available for
programming microcontrollers. While there are several options to choose
from, microcontrollers have been mostly resistant to the overcrowded
zoo of programming languages that make up the modern software
development landscape. Historically, the microcontroller world has
been dominated by the C programming language. This is because
microcontrollers have traditionally only had a few bytes of memory and
run at a few tens of megahertz of clock speed, and C is particularly well
suited to working on memory-constrained systems. Nowadays, though,
you can find microcontroller devices that have multiple cores that run up a
gigahertz and possess several megabytes of memory, opening up space for
other languages to be used.

Assembly Language
At one point in time, microcontrollers were programmed exclusively in
assembly language. Today, assembly language is reserved for devices
with limited memory and for situations where the programmer needs to
squeeze every drop of performance out of the microcontroller. Assembly
language is useful in these situations because a lot of assembly instructions

5
Chapter 1 Getting Ready

translate directly into machine instructions on the microcontroller. This


means that there is less overhead in the execution of the instructions,
making code segments written in assembly language faster. While
assembly language is fast, it takes a lot of instructions to perform a simple
task on the device. Another limiting factor of assembly language is that for
each device you are programming, you must learn the assembly language
for that device. Given these limitations, the language has declined in
popularity for all but niche situations.

C
C has long been the language of choice in the embedded world. It was
made to run on memory-constrained devices such as microcontrollers. C
gives us the ability to control the underlying hardware efficiently – one C
instruction translates into several assembly language instructions – and
it can match the speed of assembly language for most applications. Since
C has been used for so long, a lot of the code that is written has been
battle tested and proven to work for the applications they are intended. C
users have access to a large code base with helpful information and code
snippets. However, the language requires a good understanding of the
hardware and is difficult for beginners to break into.

C++
As time progressed and embedded devices became more powerful, some
microcontroller manufacturers and software vendors began adding C++
support to their devices. C++ is slowly gaining traction in the professional
embedded space. In the hobbyist realm, however, C++ finds widespread
use on the Arduino platform. C++ is a large and difficult language to learn,
however. Many of the features that make C++ more effective to use than
C in general-purpose computing applications, sometimes cannot be

6
Chapter 1 Getting Ready

implemented on the resource-constrained microcontroller devices. This is


because while C++ can match the performance of C for most applications,
C++ tends to use more memory, a precious resource that is usually not
bountiful on microcontroller devices. For that reason, C++ is reserved for
the higher-end devices.

BASIC
In the early 2000s, if a beginner was getting started with microcontrollers
and did not fancy assembly, BASIC was the programming language to use.
BASIC stands for Beginners’ All-Purpose Symbolic Instruction Code and
is an easy programming language to use. There would usually be a BASIC
interpreter on the microcontroller chip to run the instructions.
BASIC eventually fell in popularity because the boards that ran it
cost a lot of money relative to what they were capable of. Additionally,
running the BASIC interpreter slowed the chips down and took up too
many resources on the already constrained 8-bit devices. Also, the tools
and software for the most popular BASIC devices were all closed source,
so people could not make their own BASIC devices. When open source
alternatives like the Arduino came around, devices like the BASIC Stamp
thus fell out of favor.

Rust
The Rust programming language is new compared to C (which is almost
half a century old) and is designed to upset the C and C++ hold on systems
programming, including embedded programming. As microcontrollers
become more powerful and factors like concurrency (the ability to carry
out multiple processes at once) start to matter, Rust’s advantages over C
begin to show. Rust is better suited to concurrency because it can handle
a data race, which is when two devices try to access the same location in
memory at the same time.

7
Chapter 1 Getting Ready

While Rust could replace C, there is no reason for the industry to


adopt it anytime soon. Embedded software is called firmware for a reason:
it doesn’t change all that often, and much of the code that has already
been written has no reason to change to a new language. C works and has
a lot of established toolchains and devices, and there are many skilled
developers comfortable with the language. However, there are already
tools available that allow Rust to be used on microcontrollers, and as time
progresses, Rust may gain some share in the embedded market.

Python
Python is a relative newcomer to the embedded space, and it could
become a major player in the field. Python is a lot simpler than C to learn
and is one of the most popular programming languages today. While
BASIC was also easier than C for beginners, Python has several advantages
over BASIC that make it better suited for use as an embedded language.
Notably, while the popular BASIC microcontrollers were closed source,
Python is open source, allowing you to run Python on your custom device
if you desire. Python files can also be compiled to make them smaller,
allowing you to create tight, memory-efficient programs.
Many people say that interpreted languages like Python are not
suited to the limitations of microcontrollers. This may have once been
true, but with today’s more powerful devices, it is entirely possible for
microcontrollers to run interpreted languages without hiccups like the
speed limitations experienced by older BASIC devices. For extremely
time-efficient computing, also called real-time computing, interpreted
languages are still not suitable. However, Python should have no problem
meeting the speed requirements of the majority of microcontroller
projects.

8
Chapter 1 Getting Ready

While Python is not as fast or efficient as C when running on


microcontrollers, its ease of use makes it worthwhile, especially if you are
now getting started with microcontrollers. Additionally, you can extend
Python code with C, which means you can leverage existing C code bases
that have been battle tested and refined over the decades.
The Python interpreter as it exists on general-purpose computers
cannot be directly implemented on a microcontroller with the same
available features. This is because the standard Python interpreter is a
large program that relies on features that would be given by the operating
system, particularly memory and hardware interfacing features, a luxury
nonexistent on microcontroller devices. Two modified forms of the
language interpreter, MicroPython and CircuitPython, bridge the gap
between the standard Python interpreter and the embedded space. Of the
two, MicroPython is targeted more toward professional developers and
precedes CircuitPython. CircuitPython, developed by Adafruit, is simpler
to use, making it an excellent learning tool for beginners as well as a
platform for professionals. The major feature of CircuitPython that makes
it user-friendly is that you do not need to compile a program before it can
run on the microcontroller. As soon as you save a program, it is run and
executed.
CircuitPython promises to be available for more resource-constrained
devices and is expected to remain well supported into the foreseeable
future. For these reasons, we will use it throughout this book.

Selecting a Development Board


To work on the projects in this book, you will need a development board
with a microcontroller that can run CircuitPython. A development board
contains a microcontroller as well as the connections required to power

9
Chapter 1 Getting Ready

the board and get it up and running. A development board allows you to
use, program, and prototype with the microcontroller without worrying
about the hardware setup.
At the time of writing, CircuitPython supports over 140 boards, and the
list keeps growing. You can view the list here on the CircuitPython website:
https://circuitpython.org/downloads. Any one of these compatible
boards will work with this book. You can also choose to create your
own custom device that supports CircuitPython, a process I will discuss
at the end of this chapter. For beginners, however, using a premade,
CircuitPython-­compatible board will always be a better choice. It will
ensure that the hardware is working and allow you to get started more
quickly with writing software for your device.
In this section, we will look at some preconfigured devices that can run
CircuitPython. Though many companies supply microcontroller boards
that are capable of running CircuitPython, Adafruit devices have the best
support since they originated the language and have an entire ecosystem
built around CircuitPython with their development environment.
We’ll look at some of the boards that they have available, along with
some popular boards from other manufacturers that can be used with
CircuitPython. This list is not exhaustive, but the boards presented here
will be compatible with the examples discussed in this book.

Adafruit Metro M0 Express


The first board we will look at is the Adafruit Metro M0 Express, pictured
in Figure 1-1. This board is an ideal choice to be used with the examples
in this book, as it is powered by a SAMD21G18A microcontroller. This
board also has the Arduino form factor; this means that it can be used
with existing Arduino shields. Thus, the powerful Arduino ecosystem
can be used to easily prototype with Arduino shields in Python. The
SAMD21G18A represents the “ideal minimum” that is required to run

10
Chapter 1 Getting Ready

CircuitPython. Its features allow it to run the interpreter without any


hiccups. The SAMD21G18A has a 48 MHz clock, 256KB of flash memory,
and 32KB of RAM. (For comparison, boards powered by the ATmega328
microcontroller, like the Arduino Uno, offered 8 times less flash and 16
times less RAM.) The Metro M0 Express also has 2MB of flash storage that
can be used to store programs and other files. You may be able to run the
CircuitPython interpreter with less memory or less processing power than
the SAMD21G18A offers, but the experience may not be seamless.
The SAMD21G18A microcontroller was one of the first devices to
support CircuitPython, and boards built around this device are usually
among the first to receive the newest versions of the interpreter. In
particular, the Metro M0 Express was the first Adafruit Metro board
designed to use CircuitPython. It is considered the standard board for
running CircuitPython, and it will be able to run the programs in this book
decently.

Figure 1-1. Adafruit Metro M0 Express [Credit: Adafruit,


adafruit.com]

11
Chapter 1 Getting Ready

Adafruit Feather M0 Express


If you want a more minimalist approach to development, you can grab
the Feather M0 Express from Adafruit, shown in Figure 1-2. Because it
is also built around the SAMD21G18A processor, this board has all the
capabilities of the Metro M0 Express: the same 48 MHz clock, 256KB of
flash, and 32KB of RAM. It also has the same onboard 2MB of flash storage.
However, it is more compact than the Metro, and it has 5 fewer I/O pins –
20 rather than 25.
A cool feature of this board that the Metro M0 Express lacks is the little
prototyping area in the front. When you have become acquainted with the
Metro M0 Express and you want a board to embed into your own projects,
then you can use this smaller, cheaper board. There is also the QT Py board
from Adafruit which is even more compact than the M0 Express should
you need an even smaller board for your projects.

Figure 1-2. Adafruit Feather M0 Express [Credit: Adafruit,


adafruit.com]

12
Chapter 1 Getting Ready

Adafruit Metro M4 Express


If you need a little more oomph than the Metro M0 Express offers, then you
can grab the Metro M4 Express, shown in Figure 1-3. The board is powered
by the SAMD51J19 microcontroller, which offers better performance than
the SAMD21G18A-based devices discussed earlier. At 120 MHz, it runs at
more than double the clock speed of the SAMD21G18A-based boards, and
it features 512KB of flash memory, 192KB of RAM, and an additional 2MB
of onboard flash storage.
These enhanced features provide better support for digital signal
processing (DSP) and floating-point processing applications. If you want to
use your board for applications like audio processing, or if you’re looking
for better security capability or general performance improvement, then
this is a good board to use. However, the heightened performance comes
with a trade-off. The Metro M4 Express’s processor will consume more
power than the boards discussed earlier. Depending on your application,
this may not be much of a factor, though, as the board is still power
efficient.

Figure 1-3. Adafruit M4 Metro Express [Credit: Adafruit,


adafruit.com]

13
Random documents with unrelated
content Scribd suggests to you:
Raoul Auernheimer

Novelle. 2. Auflage.
Lebemänner M. 1.—, geb. M. 2.—.

”Neues Wiener Tagblatt“: Eine feine Studie aus dem Alltags-


und Liebesleben, deren Held Konrad Spreckelmayer heißt, seines
Zeichens Doktor ist und aus der altertümlichen Stadt Prag stammt.
Das letztere ist nicht unwichtig. Um in Wien den erotischen
Entwicklungsgang zu nehmen, der Spreckelmayer beschieden ist,
muß man aus Prag kommen — das können manche bestätigen.

Und der Sprosse der wackeren Moldaustadt kommt nach Wien,


aus einer Art Bibelluft nach der Babel-Atmosphäre, und hier wird er
auf dem allergewöhnlichsten Wege ein ”Lebemann“! Ihn und seine
Kameraden zeichnet nun Auernheimer in ebenso scharfer wie
delikater Weise, mit etwas Ironie, aber ohne Forcierung, ohne
zolaistische Düsterheit, ohne Schwermutsfrivolität, ohne
bacchantische Hypertrophie. Das wirkt sehr sympathisch an diesem
Buche und wieder einmal haben wir — wir wollen es dreimal und
öfter betonen — Gelegenheit davon zu sprechen, daß das junge,
frische Wien (wenige Ausnahmen abgerechnet) viel dezenter ist als
das junge, greisenhafte Berlin. Da haben wir einen eleganten
Satiriker vor uns, der sich das Rückertsche Diktum stets vor Augen
hält: ”Ich lehre dich, mein Sohn, nie über das, was über Maß das ist;
denn überall von Übel ist das Über!“ Und solch eine Eigenschaft
kann bei einem jungen Autor nicht genug gerühmt werden!
Felix Salten

Die Gedenktafel der Novelle.


Prinzessin Anna 3. Auflage.

M. 1.—, geb. M. 2.—.

Hofrat D r. M a x B u r c k h a r d t schreibt in der ”Zeit“: Die


soeben im Wiener Verlag erschienene Novelle Saltens ist von einer
ganz ungewöhnlichen Frechheit. Sie ist aber nicht nur frech, sie ist
auch gut, die Frechheit sinkt nicht herab zur lüsternen Zote, sie
erhebt sich zu blutiger Ironie. Parabasco, Herzog von Riavenna,
betritt, da er nächtlicherweile eben selbst von einem
Liebesabenteuer kommt, seine Schwester Anna, wie sie heimlich aus
einem Pförtchen des Palazzo Gembi huscht. Da er sich überzeugen
muß, daß der junge Gembi sein zartes Geheimnis nicht für sich allein
behalten hat, entschließt er sich resolut, allem geheimen Gezischel
und Getriebe dadurch vorzubauen, daß er eine Gedenktafel am
Palazzo Gembi anbringen läßt, auf der mit dürren Worten der
Öffentlichkeit mitgeteilt wird, was Prinzessin Anna in diesem Hause
erlebt hat. Welche Folgen diese Tat des Herzogs hat, wie
insbesondere das gute Volk die Prinzessin als Wohltäterin von
Riavenna im Triumphzug durch die Stadt führt und ihr angesichts der
Gedenktafel eine begeisterte Huldigung darbringt, und wie zum
Schluß der Herzog an sich selbst erfährt, welche Nutzanwendungen
ein einfaches Mädchen aus dem erhabenen Beispiele der verehrten
Fürstin zieht — das möge jeder in dem Büchlein lesen. Es könnte in
der besten Zeit der Renaissance geschrieben sein.

1. Bd.: Arthur Schnitzler. Die griechische Tänzerin.


2. Bd.: Hugo von Hofmannsthal. Das Märchen der 672. Nacht.
3. Bd.: Georg Hirschfeld. Erlebnis.
4. Bd.: Otto Ernst. Die Kunstreise nach Hümpeldorf.
5. Bd.: Felix Salten. Der Schrei der Liebe.
6. Bd.: Otto Julius Bierbaum. Das höllische Automobil.
7. Bd.: Johannes Schlaf. Die Nonne.
8. Bd.: Anton v. Perfall. Er lebt von seiner Frau.
9. Bd.: Siegfried Trebitsch. Das verkaufte Lächeln.
10. Bd.: Hans von Kahlenberg. Jungfrau Marie.

Preis jedes Bandes M. 1.—, geb. M. 2.—.

Durch alle Buchhandlungen zu beziehen.

Anmerkungen zur Transkription


Die Originalschreibweise und kleinere Inkonsistenzen in der
Rechtschreibung und Formatierung wurden beibehalten.

Die nachfolgende Tabelle enthält eine Auflistung aller


gegenüber dem Originaltext vorgenommenen Korrekturen.
Kapitel Lebenslauf: zu Grüneberg → Grünberg
Kapitel Lebenslauf: befriedigen könnte → konnte
S. 22: der Stadt Knödelmkraut → Knödelimkraut
S. 24: bist du ja veil → viel
S. 32: Du, Bartl → Bartel
S. 32: sagte Bartl → Bartel
S. 35: ”Also schön, → schön,“
S. 35: dorthin führst? → dorthin führst?“
S. 52: Ihn kreuzweise → ’Ihn kreuzweise
S. 52: zu fesseln, → zu fesseln,‘
S. 52: wird nicht → ’wird nicht
S. 53: ich .. → ich …
S. 69: Stil versag → versagt
S. 101: Weihnachts-Bowle → Weihnachtsbowle
S. 148: Sekunde der Uberzeugung → Überzeugung
S. 153: dekorativ.“). → dekorativ.“)
S. 155: und starrt unr → nur
S. 157: Zwei münchner → Münchner
S. 163: Gembi huscht → huscht.
Anhang S. 3: in grobem Parallelismus… → Parallelismus.…
*** END OF THE PROJECT GUTENBERG EBOOK DAS HÖLLISCHE
AUTOMOBIL: NOVELLEN ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation,


the trademark owner, any agent or employee of the Foundation,
anyone providing copies of Project Gutenberg™ electronic works in
accordance with this agreement, and any volunteers associated with
the production, promotion and distribution of Project Gutenberg™
electronic works, harmless from all liability, costs and expenses,
including legal fees, that arise directly or indirectly from any of the
following which you do or cause to occur: (a) distribution of this or
any Project Gutenberg™ work, (b) alteration, modification, or
additions or deletions to any Project Gutenberg™ work, and (c) any
Defect you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.
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