Programming Microcontrollers with Python: Experience the Power of Embedded Python 1st Edition Armstrong Subero download
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/
https://textbookfull.com/product/programming-microcontrollers-
with-python-experience-the-power-of-embedded-python-1st-edition-
armstrong-subero-2/
https://textbookfull.com/product/programming-pic-
microcontrollers-with-xc8-1st-edition-armstrong-subero/
https://textbookfull.com/product/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-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/
https://textbookfull.com/product/learning-scientific-programming-
with-python-1st-edition-christian-hill/
https://textbookfull.com/product/introduction-to-scientific-
programming-with-python-joakim-sundnes/
https://textbookfull.com/product/programming-with-python-for-
social-scientists-1st-edition-phillip-brooker/
https://textbookfull.com/product/learning-scientific-programming-
with-python-2nd-edition-christian-hill/
Armstrong Subero
This work is subject to copyright. All rights are solely and exclusively
licensed 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 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.
1. Getting Ready
Armstrong Subero1
(1) Basse Terre, Moruga, Trinidad and Tobago
Introduction 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.
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.
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 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 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.
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.
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.
On regaining the prairie, the boys found that General Sully had
already gone up to the Sioux camps at one side of the ravine by
which they had ascended. They at once followed, passing the
artillery and the wagon train on the way. When they arrived they
found most of the army already assembling on the farther side of
the hostile camps, at the base of Tahkahokuty. Far up on the top of
the mountain a number of Indians had gathered and were firing
upon the troops at very long range. Although the soldiers were very
much exhausted by their efforts of the afternoon and were sorely in
need of food and rest, it was evident that these annoying neighbors
must be dispersed before nightfall. Moreover, it was known that
good water was to be found somewhere near the mountain top, at
the Falling Spring of Tahkahokuty, as the Indians called the spot, and
since the troops were suffering for water, an advance was
imperative. General Sully inspected the enemy's position, then said
to Colonel Thomas, who was with him,
"Colonel, do you think some of the Eighth Minnesota could clear
those fellows out and get possession of the spring, if Captain Jones
shells ahead of them?"
"They certainly can and will, General," responded Thomas.
"Four companies ought to be enough," continued Sully. "The rest of
the troops can be having mess while they are gone."
"I will instruct Major Camp to make the advance," replied the
Colonel, riding away.
Al stepped to the General's side.
"May I have permission to accompany Major Camp, General?" he
asked. "This afternoon I came face to face with the Indian who has
my brother a prisoner,—Te-o-kun-ko,—but he got away. I might
possibly see him again up there."
"The Indian who has your brother?" exclaimed the General, much
surprised. "How do you know?"
"By the scar on his cheek and neck and by the way he looked when
I called him by name," answered Al.
"Why, in that case, of course you can go," the General replied. "But
be careful; he is undoubtedly a desperate fellow. However, it isn't
likely you will see him again. Most of them have gotten as far away
as they can by this time." Then he added, "By the way, since you are
going, watch for a practical path to the top for cavalry and wagons.
The army may have to go up there, and I certainly shall to-morrow."
Al mounted Cottontail and rode away. He had hardly reached Major
Camp's detachment, which had dismounted and was deploying to
the right as skirmishers, when the guns of the Third Minnesota
Battery began once more to boom. Their elevating-screws had been
run down to the last thread in order that the muzzles might be
raised enough to throw their shells upon the overhanging mountain
crest. The projectiles carried to their mark, bursting in sprays of
pale, orange flame high above the topmost rocks. But they did not
entirely dislodge the enemy, and after a few rounds the battery was
obliged to cease firing owing to the advance of the skirmish line.
Up along the steep, boulder-strewn breast of Tahkahokuty, through
timber and underbrush, went the thin, irregular line, eagerly
watched by the troops below and but feebly opposed by the warriors
above. It was hard climbing, and more than once Al and others in
the detachment stumbled and fell over stones or tree roots. As they
neared the top and came into clear view from the crest, the fire of
the Indians increased in intensity, though the savages continued to
shoot high so that very few of the soldiers suffered. At length the
cavalrymen scrambled over the last ledge, too breathless to shout in
response to the hearty cheers of their comrades far below, but not
too breathless to follow on a run after the Sioux who had been bold
enough to await their coming and still showed fight around the
ravine of the Falling Spring. The struggle was sharp and decisive but
it lasted only for a moment. A few carbines and sabres clashed with
lances and muskets, then the rear guard of the Sioux, unable, as
always, to stand the test of hand-to-hand conflict, broke for the
nearest cover behind them and disappeared in the tumbled
wilderness of mountains beyond, whither their families and the bulk
of their army had already gone.
Some deserted lodges stood around the triumphant Minnesotans on
the lofty eminence, but they were few in number compared to those
in the vast camp below. Al saw nothing of Te-o-kun-ko in the handful
of warriors who fled before them; and while the men were filling
their canteens at the spring of cool, crystal water which burst from
the rocks near at hand, he walked along the crest of the ridge,
looking for a less abrupt ascent than the one they had followed.
From his position, the view spread before him in the golden glow of
early twilight was magnificent. Far below and seemingly almost at
his feet, lay the bivouac of the army. He could see the soldiers
moving about, some of them still tossing their hats in enthusiasm
over the success of the charge. They looked like pygmies, and the
sound of their cheers came up to him faint and far away. Farther out
from the ridge lay the myriad dots of the Sioux lodges, and beyond
them, extending for miles upon miles until lost in the haze of the
horizon, stretched the countless rough ranges of hills over which the
army had passed in the morning. The treeless expanse of crests and
slopes, lying like a tumbled green counterpane in the distance, was
now as still and peaceful as if it had never known the turmoil of
battle or the trample of armed men.
At length Al retraced his steps and joined Major Camp, whose men
were now ready to descend to the main body, with the exception of
a strong picket left to hold and patrol the mountain top. Once more
back at headquarters, Al was not long in finishing his supper and
rolling himself in his blanket. But, though weary with the exertions
and excitement through which he had passed since daybreak, he lay
for a while thinking over the events of the past nine hours, while one
by one the sounds of the camp died away around him, and the
soldiers lay down to rest. Most of his thoughts were naturally of his
encounter with Te-o-kun-ko and the mystifying conduct of the latter.
Why had the Yanktonais failed to shoot him when he lay there
between the rocks, utterly helpless? It would have been the most
natural thing in the world for an Indian to do, for they seldom show
mercy, especially in the heat of battle. Why had that strange,
bewildered expression come over the Indian's face when Al called
him by name? And, most perplexing of all, where was Tommy now?
Among the women and children who had fled away before the army
could overtake them, or in some distant, secluded place where Te-o-
kun-ko had left him for safe-keeping? All these questions were
utterly baffling; no amount of thinking could bring a satisfactory
answer to a single one of them; and at length Al, weary in body and
mind, sunk into the dreamless slumber which had already enveloped
his comrades on every side.
The bugles were blaring out the reveille long before daylight next
morning, and in a short time the army had eaten its breakfast,
formed in column and was marching away by the left flank along the
base of Tahkahokuty, seeking a passage around or through the
mountain into the country beyond, whither the enemy had fled.
General Sully himself went straight up to the crest by a pathway
which had been discovered by Al and others the previous evening,
but what he saw there was extremely discouraging. As far as the eye
could look to the northward the country was intersected by
precipitous hills and steep ravines, some of the latter one hundred
feet deep, entirely impracticable for either cavalry or wagons. The
army marched for six or seven miles along the foot of the mountain
without finding a route by which it could be ascended or turned, and
at last the General, bearing in mind that he had rations left for only
two more days, reluctantly gave the order to halt and countermarch
to the abandoned Sioux camps, in order that these might be
destroyed before the army returned to Heart River.
Large detachments from the Second and Eighth Minnesota, the Sixth
Iowa, and the Dakota Cavalry were at once detailed as fatigue
parties and placed under command of Colonel McLaren to collect
and burn the lodge poles and lodge skins, the vast accumulations of
dried buffalo meat and dried berries,—food which, though great in
quantity, was utterly unfit for white men,—the tanned robes,
clothing, cooking utensils, saddles, travois poles, and countless other
articles left in the camps and the near-by ravines. Thirteen
companies were engaged in the task, and they spent half a day of
hard work at it, when, finding that they would be unable to finish by
evening, they set the woods and prairie on fire, and burned the
remainder of the captured property in one great conflagration. The
poles and coverings of between fourteen and sixteen hundred lodges
were destroyed, being the camp equipment, so General Sully
estimated, of between five and six thousand warriors and their
families. If correct, this meant that at Tahkahokuty the Sioux had
assembled a greater army than they ever brought together on any
other field, before or since.
A little while after noon the troops began their return march,
bivouacking that night about six miles from the battlefield, where
they were assailed by a body of Indians about dusk, but repulsed
the attack easily. Next day they reached Knife River, and on July 31,
by a march of thirty-five miles, regained Captain Tripp's camp on the
Heart. They found every one there safe and well; but, though no
Indians had been seen during the absence of the main column, both
the emigrants and the camp guard were exceedingly glad to see the
army back again, as it relieved them from their enforced idleness
and assured the early renewal of the westward march. While the
army was away, Captain Tripp had employed his men in digging a
strong line of rifle-pits around the camp, which was now in a
condition to withstand the attacks of any number of Indians.
The next two days were spent by the troops in resting themselves
and their animals, for all were very weary from the hard marching
and fighting of the past week; and by General Sully in trying to
determine upon the best route to follow in his further march toward
the Yellowstone. Al was absent from headquarters during most of
the time, making out commissary requisitions and returns in the
wagon train, though once, on the second day, he saw General Sully
as the latter passed through the train with Lieutenant Bacon, closely
inspecting the contents of each wagon. When, toward evening, he
returned to headquarters, he at once asked Wallace Smith, who had
been there continuously, what had happened during the day.
"Oh, the General seems to be having a lively time deciding what to
do," answered Wallace. "It must be a hard question. He had all the
Indian and half-breed scouts in here for hours to-day, questioning
them about the routes to the Yellowstone. All of them, excepting
one, told him they knew nothing of the country due west of us,
which must be terribly rough bad lands, from what they say. They
declare they have never ventured into it and advised the General to
return to the Cannonball and then move west to the mouth of
Powder River and down the Yellowstone to where the boats are to
meet us. But that means a long, roundabout march of probably two
or three weeks; so the General went and inspected the wagons to
see if there were supplies enough to make it."
"Yes, I saw him," interrupted Al. "There are just six days' full rations
left now."
"That's what he said when he came back," Wallace continued. "He
was a good deal worked up, and told the guides they must find a
way for the army to march straight west from here across the Little
Missouri. But all of them said it was impossible, except one
Yanktonais. He declared he had been back and forth across the Bad
Lands of the Little Missouri a number of times on hunting
expeditions, and he is sure he can lead the army through if some
digging is done in the worst places to make a road for the wagons
and artillery."
"Just one man?" exclaimed Al. "My gracious! suppose he should lead
us into a trap?"
Wallace shrugged his shoulders.
"Well, of course, he might," he agreed. "But what else can be done?
There are not rations enough to last over the other route, nor even
enough to take us back to Fort Rice. Anyway, the General has
decided to trust this chap and make the attempt and we shall start
up Heart River to-morrow morning. You know our rations are to be
cut down from one-half to one-third, so as to make them last."
"Yes, I know," answered Al. "We were issuing reduced rations this
evening. I hope we are not going to run into an ambush," he added.
"But there is no doubt General Sully knows what he is doing; he
always does."
That evening the troops were paraded and heard the General's
congratulatory orders on their conduct in the recent battle. Soon
after, they retired to rest, and it seemed that but a few moments
had passed in this refreshing occupation when reveille called them
up to their labors again. The advance guard soon moved out,
followed by the military wagon train with strong columns of troops of
the Second Brigade on each flank, the First Brigade bringing up the
rear. Then with much confusion and shouting, the Montana emigrant
train finally got under way and moved out of the intrenched camp,
leaving the latter to lie, with parapets slowly crumbling under the
rains of summer and the blizzards of winter, an object of curiosity
and vague uneasiness to straggling Indians and prowling wolves.
For three days the army pushed steadily westward up the valley of
the Heart, through a pleasant country whose hills often showed the
outcroppings of large veins of coal. Each night's camp was made in a
spot well supplied with water, grass, and wood, and the men began
to believe that the terrors of the country ahead, so vividly described
by the Indian guides, had no existence save in the imaginations of
the latter. No hostiles were seen, but the column passed one camp
ground, recently abandoned, which showed the sites of several
hundred lodges; so no one could doubt that the stealthy enemy was
still in the neighborhood and probably watching the progress of the
column closely.
Toward evening on August 5, the third day of the march, the
advance guard on arriving at the crest of a hill, similar to dozens of
other hills they had crossed that day, suddenly came to a halt. The
troops behind them could see by their gestures of excitement that
they had discovered something unusual ahead. The army and the
trains were halted and the General rode forward to the advance
guard, accompanied by his staff.
When they reached the crest of the hill and looked out beyond it,
not a man spoke for a moment, though at the first glance a few
uttered ejaculations of astonishment or dismay and then became
silent. Before them in the brilliant sunlight and lengthening shadows
of late afternoon spread a scene of such weird and desolate
grandeur as has few parallels in the world. Six hundred feet below
lay the bottom of a vast basin, apparently twenty-five or thirty miles
in diameter. From rim to rim it was piled with cones and pyramids of
volcanic rock or baked clay and other hills of every imaginable
fantastic shape, some of the peaks rising to a level with the
surrounding country and some lower, but all glowing with confused
and varied color, from gray and yellow to blue and brick red. Over all
this huge, extinct oven of what had doubtless been, sometime in
ages gone, a great coal bed which had burned out, hardly a sign of
vegetation was visible save here and there a few small, straggling
cedars or bushes on the barren hillsides. The place resembled
strongly the ruins of some mighty, prehistoric city, but more strongly
still it reminded the beholder of some of Dante's vivid descriptions of
the infernal regions.
They bivouacked that night on the prairie and early next morning
marched down into the forbidding basin, knowing not whether they
would ever emerge from it alive.
All day long in suffocating heat and under the glare of an almost
intolerable sun they toiled forward, winding in and out through
gorges with high, perpendicular walls and yawning ravines so narrow
that only one wagon could pass at a time. No water could be found
save a little which was bitter with alkali. A large pioneer party was in
advance, grading along hillsides and filling gullies so that the wagons
might pass; by nightfall the army had succeeded in covering twelve
miles and found itself on the bank of the Little Missouri, where at
least water and grass were abundant. But the expedition was literally
buried in the Bad Lands, which, on the western side of the stream,
still stretched before them in a wilderness of mountains and gorges
even more forbidding than those they had already passed.
Fortunately no Indians had yet opposed them, and many of the
men, especially those in the advance and on the flanks, had found
some pleasure mixed with their labor in viewing the strange and
beautiful rock formations through which they passed. Here were
many petrified stumps and fallen trunks of trees on the tops and
sides of the hills. Some of them were of immense size and
wonderfully preserved, showing the bark, the stumps of branches,
and the age rings of the interior wood. At one place was seen what
the men called a "petrified sawmill", consisting of what appeared like
a pile of lumber and slabs under the edge of a hill and, close by it, a
large tree, cut up into logs of exact length, such as might be found
around any sawmill, but all of stone as hard as granite. In addition
to the trees, many of the men found impressions of leaves in the
rocks of sizes and shapes belonging to no vegetation of the present
age, while others discovered the footprints of unknown animals
which had once inhabited this ancient land.
Colonel Pattee with his detachment of the Seventh Iowa crossed the
Little Missouri the following morning to trace out, if possible, with
the Yanktonais guide, a route leading westward from the river. He
was gone for some hours and, meanwhile, a few of the men seized
the opportunity to take their horses outside the lines in search of
better grazing. They had not been out very long when they saw a
party of thirty or forty Indians bearing down upon them, intent on
cutting them off from camp. The soldiers were too few to think of
fighting, so they fled at utmost speed, and all succeeded in getting
in, though several escaped very narrowly. The attempted surprise
seemed to be the signal of the Indians for the beginning of a general
attack on the army, for in a moment the bluffs across the river were
swarming with warriors, who opened a hot fire on the camp, though
at such long range that their bullets could not reach half the
distance. Just after they began firing, a horseman dashed out of the
ravine directly beneath their position, which Colonel Pattee's
detachment had ascended, and plunging into the river, trotted and
galloped his horse across amid a great splashing of water. It was
Lieutenant Dale, who had followed Colonel Pattee with an order an
hour or two before. General Sully met him at the river bank.
"What's the matter?" he demanded, the moment the Lieutenant
reached him.
"The Seventh Iowa is attacked back there two or three miles, in the
hills," replied Dale. "Colonel Pattee wants reinforcements."
He had scarcely finished speaking when there arose the sound of
many hurried hoof beats in the ravine from which he had just
emerged. The General looked toward it with a growing smile which
presently broke into a laugh as a confused crowd of cavalry rushed
from the ravine and galloped furiously down to and through the
river.
"The Seventh has evidently come after its own reinforcements,
Lieutenant," said he. "They must be in a hurry for them."
"It looks like it," answered Dale, grinning.
He retired, while the leading officer of the frightened cavalry hastily
explained to the General that the Indians had come upon them in
such a position and in such numbers that the only way they could
save themselves was by instant flight.
"Is that so?" asked Al of the Lieutenant, after hearing this
explanation.
"No," returned Dale, laughing, as he dismounted and sat down
cross-legged on the ground for a moment's rest. "They were just
scared, but it's no wonder. There are enough redskins around to
have made it true. I believe the whole Sioux Nation is out in front of
us there. They pretty nearly got me; tumbled a couple of ton rock
down when I was coming through that ravine and just missed my
horse by about six inches, and they fairly singed my hair with
bullets. I guess the ball has started again."
The ball had started again, sure enough, for when the army crossed
the river next morning and began threading the succession of
ravines and canyons which Colonel Pattee had traced and partially
dug out the day before, it was instantly attacked by the Sioux on all
sides, in numbers seemingly as great as had fought at Tahkahokuty.
On this day detachments from the Second Brigade formed the
advance guard, under Major Robert H. Rose, of the Second
Minnesota, supported by Jones's battery. The rest of the Second
Brigade guarded the army wagon train, with strong flanking parties
out on each side to hold the hills and transverse valleys from which
the enemy might fire upon or charge the train. Behind the Second
Brigade came the First, similarly protecting the Montana emigrant
train, the Coyotes and two companies of the Sixth Iowa bringing up
the rear, while Pope's battery held itself ready to shell the hills or
ravines whenever the enemy appeared in sufficient force to justify
unlimbering the guns.
The march was slow and fatiguing in the extreme. The Indians,
holding the tops and sides of the long succession of narrow passes
or canyons through which the army must go, poured their fire down
upon the troops until dislodged by the fire of the artillery or the
approach of the flankers, when they would fall back to another
position of like strength and repeat their tactics. The wagons, after
advancing about three miles, were parked in a space where the pass
opened to a somewhat greater width; while the troops, pushing on,
cleared the hills to allow the fatigue parties to dig out and level
some three miles more of road. Then once more the unwieldy train
unwound into column and crept carefully forward along the trail. The
latter, in spite of the efforts of the pioneers, was often so narrow and
slanting that it was all several men could do to keep the wagons
from overturning and blocking the road permanently. Officers and
men were working together on the firing line and among the trains,
coatless and dripping with sweat in a temperature of one hundred
and ten degrees in the shade. Their throats were parched with
thirst, for the water brought from the Little Missouri was soon
exhausted, and no more could be obtained throughout the day
except at one tiny spring, to which the Indians clung so stubbornly
that they were only dislodged by the Second Minnesota after a sharp
fight.
Attack after attack was launched on the advance guard; and when
repulsed there by the steady volleys of the cavalry carbines and
shells of the Third Minnesota Battery, the warriors would concentrate
and rush upon one or the other flank, if the ground was open, or
else lie in concealment and fire upon it as it approached. Up and
down the hills in every direction the braves could be seen, riding
their nimble-footed ponies along slopes so steep that it seemed even
a dismounted man could not keep his footing there.
Toward noon a serious misfortune fell on the army in the loss of the
Yanktonais guide, the only man who knew the country through
which they were passing. He had proved very faithful to his trust,
and in his zeal to lead the march correctly, he had ventured too far
to the front, where he was severely wounded in the breast, the
bullet coming out under his shoulder blade.
All day long the members of the General's staff were on the run,
carrying orders, suggestions or cautions to the commanders of the
various organizations, hurrying forward the lagging wagons and
sometimes themselves becoming involved in one or another of the
many skirmishes constantly blazing up among the tumbled hills.
Once Lieutenant Dale rode back to the General's position near the
head of the column, with the blood running over his face from a
wound in the cheek.
"Oh, are you badly hurt?" asked Al, who happened to be there,
startled and anxious.
"No," the Lieutenant returned, lightly, dabbing some of the blood
from his cheek. "I've been back to the rear guard to tell Captain
Miner that the redskins were getting ready to swing around on him.
They did, just about as I got there, and stirred him up pretty lively,
but the boys repulsed them. One fellow grazed my cheek, that's all.
Just look at them!" His glance swept the surrounding hills, on every
one of which groups or masses of Indians were to be seen. "They
seem to be everywhere, and for every one killed it looks as though
ten new ones sprang out of the ground." He looked at Al and an
ominous expression passed over his face. "Have you ever heard of
Kabul Pass?" he inquired, in a low tone.
Al returned his glance steadily.
"Yes, I have," he admitted, slowly.
"It looks something like that around here, doesn't it?" the Lieutenant
continued. "Only one man came out of Kabul Pass alive, you
remember."
"Why, you're right," answered Al, feeling a passing throb of
foreboding. "But I think we shall do better than that," he added,
hopefully.
"Oh, no doubt," agreed Dale. "I was just thinking of the similarity of
positions, that's all."
In an instant his mood changed and he laughed at a sudden
recollection.
"I saw a funny thing back there," he chuckled. "You know the oxen
those emigrants are driving are pretty well fagged out; every now
and then one of them lies down and has to be exchanged for a fresh
one from the herd. The rear guard has orders to shoot all the
exhausted animals, so the Indians won't get them. While I was back
there one big ox fell over, and he was unyoked and left on the
ground, looking as good as dead. But as the rear guard passed him,
he heard their shots and then the yells of the redskins close behind,
and he raised his head and looked at the Indians. They were
pushing up, hoping to catch him alive. I guess he didn't like their
looks, for all at once he scrambled to his feet and made a bolt for
the herd, charging right through the rear guard with his tail sticking
straight out and his eyes bulging with fright. Now he's travelling with
the rest of the cattle and seems as well as any of them."
Al laughed heartily. "He ought to have a medal," he declared.
"Yes, he had," agreed Lieutenant Dale, "a leather one, anyway."
A long time after noon, the walls of the canyon through which the
column was marching became gradually lower, and after a while the
hard-pressed troops and trains found themselves passing out of the
dangerous defile upon a comparatively level plateau, higher than
most of the surrounding Bad Lands, though it was girt on all sides by
the characteristic peaks and gulches of the region. Here General
Sully decided to make camp for the night, though he had marched
only ten miles, for here had been found a little grass and a large
pool of stagnant, muddy rain water, which, however, was better than
none at all, and no one could tell whether any existed farther on.
The troops were placed in very compact formation and the trains
corralled, the emigrants a little to the east of the military camp.
CHAPTER XIV
TE-O-KUN-KO
After supper had been eaten and rations distributed for the next day,
it was nearly sunset, and Al and Wallace sat down on the ground
near General Sully's tent to clean their weapons and enjoy a few
minutes of welcome rest.
"I never saw anything like that canyon we were in to-day," said
Wallace. "More than once I thought we were going to be cleaned out
there, and we would have been if we'd had civilized troops to deal
with."
"Why, of course," Al answered. "Civilized troops one-tenth as strong
as we could have held it against us for a year. Yet we've lost only
eight or ten men wounded all day. The Indians haven't enough
staying qualities, though they have plenty of dash and are
magnificent horsemen."
"Yes, that's true," agreed Wallace. Then suddenly he dropped his
ram-rod and sprang to his feet. "Look there!" he exclaimed. "Are
they going to try some more of their dash this evening, after all
they've done to-day?"
The dry expanse of prairie where the camp lay, sloped gradually up
to the eastward, terminating in a ridge at a distance of about a mile
from the camp. Over the crest of this ridge a throng of Sioux
warriors was now galloping, much as they had come over that other
ridge at the opening of the battle of Tahkahokuty. The emigrant
camp lay nearest to them, and here a great confusion and panic
immediately arose, and women and children began to emerge from
the corral and run toward the military camp, shrieking and calling
piteously for help. Without waiting for orders scores of soldiers
seized their weapons and rushed out across the prairie toward the
fugitives, many of whom, as soon as they were within the lines, fell
to the ground exhausted or weeping hysterically. The soldiers, once
started, continued their advance on the enemy, the swiftest runners
distancing the rest. The Indians halted and fired, then seeing that
their antagonists were not checked, began sullenly to retire, not
even hastening much from the shells of the cannon, which had
opened along the eastern edge of the camp. So the retreat and
pursuit continued to the crest of the ridge, where the Indians went
out of sight into the Bad Lands just beyond.
Al and Wallace, who had run out at the first alarm, presently found
themselves, in company with one of the Sioux guides and a couple
of soldiers of the Sixth Iowa, on the edge of the ridge with a deep,
narrow valley before them, bounded on its farther side by four
hillocks, or small buttes, shaped like sugar loaves and each
separated from the next by crooked gullies, washed deep by rains.
At the left end of this series of buttes lay a long, open space,
entirely bare of vegetation, apparently extending around behind
them. Not an Indian was in sight, but Wallace suggested,
"I believe some of the redskins are hiding behind those buttes. Let's
surprise them. I'll tell you what we can do. You fellows," he
addressed the two cavalrymen, "stay here and the rest of us will go
back a little way and then sneak around and down across that open
space and get in behind the flank of the buttes. If there are any
Indians there, we can shoot them before they can get away."
"But there may be a lot of them," objected one of the troopers, "and
they'll clean you out."
"No," declared Wallace, with conviction. "It's only a little way across,
and if there are too many of them we can run back while you cover
us with your fire. Besides, lots of the boys are near by."
This was true; a number of soldiers were still a short distance back
on the plateau.
"What do you think of it?" asked Al, turning to the Sioux guide, who
happened to be one who could speak English, as well as his own
tongue.
"Good," said the Indian. "I go."
"Come on, then," urged Wallace, who seemed determined to have
an adventure if possible.
Followed by Al and the guide he walked back across the prairie until
the ridge hid them from view of any watchers who might be on the
buttes. The two troopers, meanwhile, lay down on the edge of the
ridge to wait developments. As soon as they were out of sight of the
buttes, the boys turned north and ran for some distance, then
swinging east again regained the edge of the ridge opposite the
open ground below. Here they could not be seen from any except
the northernmost butte and, hastening down the slope, they ran
across to the base of this butte and around to its farther side.
Looking up, they saw two Indians lying behind the top of the next
adjoining eminence, peeping over at the two soldiers across the
valley. Simultaneously the three adventurers fired. The head of one
of the warriors dropped between his outstretched arms and he lay
still without a struggle. His companion sprang to his feet, cast one
terrified glance at the unexpected assailants below him and leaped
with a few long bounds down the steep slope into the ravine at its
base and around the third butte, where he disappeared. Al and
Wallace gave a shout, in which the Indian scout joined, and Al ran
on in the direction taken by the warrior, followed by Wallace. But the
scout hesitated.
"Maybe better go back now, eh?" he called.
"Oh, no; come on!" Al shouted back. "We can get out anywhere and
we've got him on the run."
The scout said no more, but followed. They passed the ravine and
the base of the next butte, and came to the gully between that and
the fourth and last eminence to the south. From this eminence a
little ridge ran eastward out across the open ground. As they came
toward it an Indian rose half his height behind it, then, seeing them,
dropped down again. Al ran to the left to get around behind him,
and, as he did so, Wallace and the scout both saw another warrior,
farther up on the fourth butte, stand erect and aim at him.
"Look out, Al!" shouted Wallace.
"Drop, Briscoe!" cried the guide at the same instant, and Al
instinctively flung himself full length upon the ground just as the
Indian fired. The bullet passed over him; but at this moment Wallace
noticed still another hostile raise his head above the ridge and look
eagerly toward Al. He had no time to interpret the glance, but the
thought came to him that more Indians were showing themselves
than he had expected, and he cried,
"Come on out, boys! They're getting too thick."
Followed by his companions, he sprang into the gully close at hand,
expecting to see the valley beyond and the prairie ridge where the
two Iowa soldiers were lying. But, instead, a few yards up the
trench-like gulch he came to a sharp turn. As he rounded it, he
caught a glimpse of several Indians crouching down a little farther
on, their guns cocked and ready, and he dodged back again, almost
colliding with Al and the scout, behind him.
"I guess we're goners," he exclaimed, as he heard the swift patter of
moccasined feet behind and on the edges of the gully above them.
"Oh, what an idiot I was to get you fellows and myself into this. It's
my fault."
"No, it isn't, Wallace," declared Al. "It's mine. If I'd minded this
scout, we'd have gotten back all right."
But at this moment, which it seemed evident must be their last, they
heard a deep, commanding voice speak a few rapid words in the
Sioux tongue, and the sound of footsteps ceased.
"They're going to rush us," whispered Al, his voice shaking but his
eyes still courageous. "Let's give them all the shots we can and then
kill ourselves. Good-bye, Wallace, old man,—and good-bye, mother,
and Annie, and Tommy," he added, to himself.
Thoroughly expecting death within a few seconds, he could hardly
believe his ears when he heard the same deep, masterful voice
which had halted their pursuers, say, loudly,
"Al Briscoe! Al Briscoe!"
Al, shaking and pale, looked at his companions, too amazed and
bewildered even to hear the Sioux words, unintelligible to him, which
followed his name. The mere utterance of the latter, in such a place
and under such circumstances, was of itself ominous and terrifying
enough to chill his blood, for it seemed to single him out from his
companions for some special and horrible fate. But the Sioux scout
looked at him solemnly.
"You understand?" he asked.
"No," answered Al, shuddering.
"He say, 'Al Briscoe, I, Te-o-kun-ko, want talk with you.'"
"Te-o-kun-ko?" exclaimed Al, his strength coming back to him at that
familiar name. "Indeed, yes. If he does kill me, I shall at least find
out first."
He prepared to scramble up the side of the gully, but the scout
restrained him.
"No go till he say he not kill," said he.
"Ask him," Al replied.
The scout called out the question in Sioux and Te-o-kun-ko
answered, a note of surprise and satisfaction in his voice. The scout
himself looked relieved.
"He say, 'you got interpreter. Good!'" he repeated. "He say, 'come up
and bring him. We no kill.'"
There was nothing else to do, so the three scrambled to the top of
the gully, Wallace bringing up the rear. When he had regained his
feet, Al saw confronting him the superbly handsome figure of his
brother's captor, the muscles of his arms, the curve of his deep
chest, his proudly poised head, and eagle-like features, all mellowed
and harmonized in the soft glow of early twilight, until he looked
more like a bronze statue than a human being. The Indian was
leaning on a long rifle and he wore a short tunic, buckskin leggings,
and moccasins, all heavily embroidered with brilliant bead work,
while a splendid war bonnet of brightly colored feathers hung from
his head nearly to the ground. A handsome necklace of bears' claws,
fastened around his neck and depending over his massive chest,
completed a costume of savage magnificence strikingly becoming to
this lord of the prairies. A few feet behind him stood a dozen or
more warriors, their guns lying across their arms. They were as
silent and motionless as Te-o-kun-ko, but the glances of sullen
animosity which they flashed at Al and his companions showed
clearly enough that it was only the strong hand of their leader which
restrained them from instantly slaying the white boys and their
Indian comrade.
Te-o-kun-ko did not move as his three involuntary guests came up
before him but, leaning on his rifle, he regarded Al with a gaze so
keen and steadfast that the latter's eyes wavered, and to break the
silence he said,
"How."
"How, Al Briscoe," replied the Indian, still without moving.
A rush of indignation suddenly swept over Al as he remembered who
this man was.
"Ask him," said he, sharply, to the scout, "where my brother is."
He was determined to learn at least this much before anything could
happen to prevent.
The question was repeated, but Te-o-kun-ko did not reply
immediately. At length he said, through the interpreter,
"You are bold for a boy, Al Briscoe. Do you hold your life of no value
that you demand your brother now, when you are in my power?"
"I hold his life of more value than my own, Te-o-kun-ko," replied Al,
stoutly. "Would you not feel the same for your brother?"
The Indian flashed a look at him which seemed almost one of
sympathy.
"Yes," said he, and paused. Presently he went on, "If you were not
brave you would not be worthy of such a brother. But I knew that
you were brave the day I took him from you beyond the Yellow
Medicine, and I knew it better eleven suns ago when you came after
me like a hungry wolf under the shadow of Tahkahokuty. So I will
tell you."
He paused again, as if reflecting, then continued in the following
words, uttering them deliberately, and they were interpreted, phrase
after phrase, by the Sioux scout:
"Your brother was such a one as should have been an Indian, and so
I thought to make him. He fears neither the darkness nor the flood
nor the lightning, the buffalo stampede nor the rush and shouting of
armed men. No lad of my tribe can shoot straighter than he and he
rides a horse as the gray goose rides the north wind. He learned our
speech more quickly than a Cheyenne, of our own race, could have
learned it, and he came to love our life; I know, for he told me so,
often. And he loved me, who sought to be as his father, and my
squaw, Techon-su-mons-ka (The Sandbar), and his foster brothers
and sisters, Mah-to-che-ga (The Little Bear), Ka-pes-ka-da (The
Shell), and Mong-shong-sha (The Bending Willow). Your brother
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.
textbookfull.com