100% found this document useful (2 votes)
18 views

Hands On Internet of Things with Blynk Build on the Power of Blynk to Configure Smart Devices and Build Exciting IoT Projects 1st Edition Pradeeka Seneviratne instant download

The document is a promotional description for the book 'Hands-On Internet of Things with Blynk' by Pradeeka Seneviratne, which guides readers on configuring smart devices and building IoT projects using the Blynk platform. It covers setting up a development environment with Raspberry Pi, building applications, using various widgets, and connecting sensors. The book is aimed at individuals with a basic understanding of electronics and programming who want to create rapid IoT applications.

Uploaded by

beazithyjos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
18 views

Hands On Internet of Things with Blynk Build on the Power of Blynk to Configure Smart Devices and Build Exciting IoT Projects 1st Edition Pradeeka Seneviratne instant download

The document is a promotional description for the book 'Hands-On Internet of Things with Blynk' by Pradeeka Seneviratne, which guides readers on configuring smart devices and building IoT projects using the Blynk platform. It covers setting up a development environment with Raspberry Pi, building applications, using various widgets, and connecting sensors. The book is aimed at individuals with a basic understanding of electronics and programming who want to create rapid IoT applications.

Uploaded by

beazithyjos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

Hands On Internet of Things with Blynk Build on

the Power of Blynk to Configure Smart Devices


and Build Exciting IoT Projects 1st Edition
Pradeeka Seneviratne install download
https://ebookmeta.com/product/hands-on-internet-of-things-with-
blynk-build-on-the-power-of-blynk-to-configure-smart-devices-and-
build-exciting-iot-projects-1st-edition-pradeeka-seneviratne/

Download more ebook from https://ebookmeta.com


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

STM32 IoT Projects for Beginners: A Hands-On Guide to


Connecting Sensors, Programming Embedded Systems, Build
IoT Devices with STM32 1st Edition Aharen San

https://ebookmeta.com/product/stm32-iot-projects-for-beginners-a-
hands-on-guide-to-connecting-sensors-programming-embedded-
systems-build-iot-devices-with-stm32-1st-edition-aharen-san/

Internet of Things Theory and Practice Build Smarter


Projects to Explore the IoT Architecture and
Applications Amit Kumar Tyagi

https://ebookmeta.com/product/internet-of-things-theory-and-
practice-build-smarter-projects-to-explore-the-iot-architecture-
and-applications-amit-kumar-tyagi/

Beginning MicroPython with the Raspberry Pi Pico: Build


Electronics and IoT Projects 1st Edition Charles Bell

https://ebookmeta.com/product/beginning-micropython-with-the-
raspberry-pi-pico-build-electronics-and-iot-projects-1st-edition-
charles-bell/

Conjunctive Explanations in Science and Religion 1st


Edition Diarmid A Finnegan

https://ebookmeta.com/product/conjunctive-explanations-in-
science-and-religion-1st-edition-diarmid-a-finnegan/
Phytochemicals in Food and Health Perspectives for
Research and Technological Development 1st Edition
Mamta Thakur

https://ebookmeta.com/product/phytochemicals-in-food-and-health-
perspectives-for-research-and-technological-development-1st-
edition-mamta-thakur/

Princeton Review AP U S History Prep College Test


Preparation 23rd Edition The Princeton Review

https://ebookmeta.com/product/princeton-review-ap-u-s-history-
prep-college-test-preparation-23rd-edition-the-princeton-review/

My Revision Notes: AQA GCSE (9-1) Business Malcolm


Surridge

https://ebookmeta.com/product/my-revision-notes-aqa-
gcse-9-1-business-malcolm-surridge/

Europeanisation, Good Governance and Corruption in the


Public Sector: The Case of Turkey 1st Edition Digdem
Soyaltin

https://ebookmeta.com/product/europeanisation-good-governance-
and-corruption-in-the-public-sector-the-case-of-turkey-1st-
edition-digdem-soyaltin/

Reflect Relate An Introduction to Interpersonal


Communication 5th Edition Steven Mccornack

https://ebookmeta.com/product/reflect-relate-an-introduction-to-
interpersonal-communication-5th-edition-steven-mccornack/
Fundamentals of Causal Inference with R 1st Edition
Babette A. Brumback

https://ebookmeta.com/product/fundamentals-of-causal-inference-
with-r-1st-edition-babette-a-brumback/
Hands-On Internet of Things with Blynk

Build on the power of Blynk to configure smart devices and build


exciting IoT projects

Pradeeka Seneviratne

BIRMINGHAM - MUMBAI
Hands-On Internet of Things
with Blynk
Copyright © 2018 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers
and distributors, will be held liable for any damages caused or alleged to have been caused
directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

Commissioning Editor: Gebin George


Acquisition Editor: Prachi Bisht
Content Development Editor: Trusha Shriyan
Technical Editor: Varsha Shivhare
Copy Editor: Safis Editing
Project Coordinator: Kinjal Bari
Proofreader: Safis Editing
Indexer: Pratik Shirodkar
Graphics: Jisha Chirayil
Production Coordinator: Shantanu Zagade

First published: May 2018

Production reference: 1220518

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

ISBN 978-1-78899-506-1

www.packtpub.com
mapt.io

Mapt is an online digital library that gives you full access to over
5,000 books and videos, as well as industry leading tools to help you
plan your personal development and advance your career. For more
information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical
eBooks and Videos from over 4,000 industry professionals

Improve your learning with Skill Plans built especially for you

Get a free eBook or video every month

Mapt is fully searchable

Copy and paste, print, and bookmark content


PacktPub.com
Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade to the
eBook version at www.PacktPub.com and as a print book
customer, you are entitled to a discount on the eBook copy. Get in
touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free


technical articles, sign up for a range of free newsletters, and receive
exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Pradeeka Seneviratne is a software engineer with over 10 years
of experience in computer programming and systems design. He is
an expert in the development of Arduino- and Raspberry Pi-based
embedded systems, and is currently a full-time embedded software
engineer working with embedded systems and highly scalable
technologies. Previously, he worked as a software engineer for
several IT infrastructure and technology servicing companies. He has
also authored Beginning BBC micro:bit, published by Apress.
About the reviewer
Munawwar Hussain Shelia is a digital artist and software
engineer based in Mumbai, India. An engineering graduate (BE) in
computer science, his curiosity to try his hand at the next latest
technology keeps him thinking ahead on the boundaries of coding.
He started his career in mobile application development with Java
and Android, before moving on to full-stack JavaScript (MEAN stack)
Node.js, where he put his heart and soul into building more real-
time web applications. Currently, he is in the role of data science,
and extracts actionable intelligence and does predictive analytics
from large datasets.
Packt is searching for authors
like you
If you're interested in becoming an author for Packt, please visit
authors.packtpub.com and apply today. We have worked with
thousands of developers and tech professionals, just like you, to help
them share their insight with the global tech community. You can
make a general application, apply for a specific hot topic that we are
recruiting an author for, or submit your own idea.
Table of Contents
Title Page
Copyright and Credits
Hands-On Internet of Things with Blynk
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews

1. Setting Up a Development Environment


What is Blynk?
Hardware platforms
Connection types
Blynk architecture
Blynk ecosystem
Online resources
The Blynk app builder
Installing the Blynk app builder
Creating a Blynk account
Creating a new project
Getting parts
Raspberry Pi
Setting up Raspberry Pi
Setting up software on Raspberry Pi
Installing Raspbian
Writing Raspbian Stretch Lite image on SD
card
Creating a configuration file for SSH
Connecting with Raspberry Pi with SSH
Configuring a wireless connection on
Raspberry Pi
Installing prerequisite software on Raspbian
Updating and upgrading Raspbian
Installing git
Installing WiringPi
Deploying Blynk libraries
Connecting Raspberry Pi with Blynk Cloud
Summary
2. Building Your First Blynk Application
Controlling an LED
Things you need
Building the circuit
Building the Blynk app
Adding a Button widget
Running the project
Playing the app
Using virtual pins
Configuring Button widget with virtual pin
Modifying the main.cpp file
Running the project
Summary

3. Using Controller Widgets


Creating a project
Slider
Adding a Slider widget
Using digital pins
Using virtual pins
Step
Adding a Step widget
Using digital pins
Using virtual pins
zeRGBa
Using digital pins
Using virtual pins
Controlling an RGB LED
Building the circuit
Running the project
Joystick
Using digital pins
Using virtual pins
Summary

4. Using Display Widgets


Value Display
Using digital pins
Using virtual pins
Labeled Value
Configuring a Labeled Value widget
LED
Using virtual pins
Summary

5. Using Notification Widgets


Twitter
Adding a Twitter widget
Configuring
Sending tweets
Twitter button
Notification widget
Configuring the Notification widget
Writing a notification
Email
Configuring the Email widget
Writing code to send email
Summary

6. Connecting with Sensors on Your Mobile Device


Accelerometer
Accelerometer widget
Configuring the Accelerometer widget
Reading accelerometer data
Calculating overall acceleration
Light sensor
Adding the Light Sensor widget
Configuring the Light Sensor widget
Reading light sensor
Proximity sensor
Configuring the Proximity Sensor widget
Writing code
Summary

7. Setting Up a Personal Blynk Server


Setting up a Blynk server on Raspberry Pi
Enabling autostart with rc.local
Enabling autostart with crontab
Verifying that the Blynk server is running
Connecting the Blynk app builder with the
server
Creating a new project to get the auth
token
Using the administration interface
Writing a simple code to build the
connection
Summary

8. Controlling a Robot with Blynk


Choosing a chassis kit
Adafruit
SparkFun
Pololu
Creating a Blynk app
Motor driver
Summary
Other Books You May Enjoy
Leave a review - let other readers know what
you think
Preface
Blynk is referred to as the most user-friendly IoT platform, providing
a way to build mobile applications in minutes. With Blynk's drag and
drop mobile app builder, anyone can build amazing IoT applications
with minimal resources and effort. Blynk supports over 400 hardware
platforms and major connectivity types. The hardware could be
prototyping platforms, such as Arduino and Raspberry Pi, to
industrial-grade ESP8266, Intel, Sierra Wireless, Particle, and Texas
Instruments offerings.

This book uses Raspberry Pi as the main hardware platform and


C++ for writing code to build projects.

The first part of this book offers how to set up the development
environment with Raspberry Pi, Raspbian Stretch LITE, and various
software components. Then, the reader will build the first IoT
application with Blynk.

The middle part of the book presents how to use and configure
various widgets (control, display, and notify) with Blynk app builder
to build applications.

The latter part of the book will introduce how to connect with and
use built-in sensors on mobile devices such as Android and iOS. After
this, the reader will learn how to set up a personal Blynk server on
Raspberry Pi. Finally, the reader will learn how to build a robot
vehicle that can be controlled with a Blynk app through the Blynk
cloud service.
Who this book is for
This book is for those who want to build rapid IoT applications in
minutes for connected products and services with only a basic
understanding of electronics, Raspberry Pi, and C++.
What this book covers
Chapter 1, Setting Up a Development Environment, explains how
to set up the development environment for Blynk with Raspberry Pi.
It describes how to install Blynk libraries and some supporting
software components that you can use to build Raspberry Pi-based
IoT hardware. Then, you will build a control application with Blynk
app builder. After that, you need to write a C++ application to
connect with the Blynk cloud. Finally, you run the Blynk app to
connect the Raspberry Pi to Blynk app builder through the Blynk
cloud over a Wi-Fi network.

Chapter 2, Building Your First Blynk Application, explains how to


build your first Blynk application to control an LED (or any actuator)
attached to the Raspberry Pi from your smartphone or tablet. First,
you will build an app with the Blynk app builder. Then, you will use
digital or virtual pins to control the attached LED. After that, you will
learn how to write a simple C++ application with nano text editor.
Finally, you will build the application and run it to connect the Blynk
app and the Raspberry Pi hardware.

Chapter 3, Using Controller Widgets, covers how to use controller


widgets such as Slider, Step, Joystick, and zeRGBa, to control
actuators. You will also learn how to use WiringPi’s software PWM
library, connect controller widgets with digital and virtual pins, use
the split and merge mode, and parsing values coming from the
controller widgets.
Chapter 4, Using Display Widgets, guides you on how to use
display widgets, such as the Value Display widget, and Labeled Value
widget to show sensor data, and the LED widget to show a button
state.

Chapter 5, Using Notification Widgets, explains how to send


notifications to the Blynk app from Raspberry Pi. You will schedule
your Raspberry Pi to send notifications to your smartphone on user
action. Some of the notification widgets can be integrated with third-
party services, such as Twitter to send tweets from Raspberry Pi.
Then, you will use the notification widget to send pop-up
notifications to the smartphone or tablet. Finally, you will also learn
how to send emails from Raspberry Pi using the Email widget.

Chapter 6, Connecting with Sensors on Your Mobile Device,


guides you on how to read data from built-in sensors such as the
accelerometer, light sensor, and proximity sensor on your
smartphone or tablet.

Chapter 7, Setting Up a Personal Blynk Server, guides you on how


to set up a personal Blynk server on Raspberry Pi. The Blynk
personal server replaces the Blynk cloud. You can connect all your
Blynk hardware to this personal server through your local network.

Chapter 8, Controlling a Robot with Blynk, explains how to build a


robot vehicle using a two-wheeled robot chassis kit. Then, you will
build an application with the Blynk app builder to control it through
the Blynk cloud by connecting to a Wi-Fi network.
To get the most out of this
book
You should install the Raspbian Stretch LITE operating system on
Raspberry Pi. The nano text editor is used to write C++ code in the
Raspberry Pi environment. PuTTY is used to make serial connections
between Raspberry Pi and the computer that is running Windows.
Download the example code
files
You can download the example code files for this book from your
account at www.packtpub.com. If you purchased this book
elsewhere, you can visit www.packtpub.com/support and
register to have the files emailed directly to you.

You can download the code files by following these steps:

1. Log in or register at www.packtpub.com.


2. Select the SUPPORT tab.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box and follow the
onscreen instructions.

Once the file is downloaded, please make sure that you unzip or
extract the folder using the latest version of:

WinRAR/7-Zip for Windows


Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at


https://github.com/PacktPublishing/Hands-On-
Internet-of-Things-with-Blynk. If there's an update to the
code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and
videos available at https://github.com/PacktPublishing/.
Check them out!
Download the color images
We also provide a PDF file that has color images of the
screenshots/diagrams used in this book. You can download it here:
https://www.packtpub.com/sites/default/files/down
loads/HandsOnInternetofThingswithBlynk_ColorImage
s.pdf.
Conventions used
There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names,


folder names, filenames, file extensions, pathnames, dummy URLs,
user input, and Twitter handles. Here is an example: "Mount the
downloaded WebStorm-10*.dmg disk image file as another disk in
your system."

A block of code is set as follows:


BLYNK_WRITE(V1) // zeRGBa assigned to V1
{
// get a RED channel value
int r = param[0].asInt();
// get a GREEN channel value
int g = param[1].asInt();
// get a BLUE channel value
int b = param[2].asInt();
}

Bold: Indicates a new term, an important word, or words that you


see onscreen. For example, words in menus or dialog boxes appear
in the text like this. Here is an example: "Under CONTROLLERS, tap
zeRGBa. A zeRGBa widget will add on to the canvas."

Warnings or important notes appear like this.

Tips and tricks appear like this.


Get in touch
Feedback from our readers is always welcome.

General feedback: Email [email protected] and


mention the book title in the subject of your message. If you have
questions about any aspect of this book, please email us at
[email protected].

Errata: Although we have taken every care to ensure the accuracy


of our content, mistakes do happen. If you have found a mistake in
this book, we would be grateful if you would report this to us. Please
visit www.packtpub.com/submit-errata, selecting your book,
clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any
form on the Internet, we would be grateful if you would provide us
with the location address or website name. Please contact us at
[email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic


that you have expertise in and you are interested in either writing or
contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why
not leave a review on the site that you purchased it from? Potential
readers can then see and use your unbiased opinion to make
purchase decisions, we at Packt can understand what you think
about our products, and our authors can see your feedback on their
book. Thank you!

For more information about Packt, please visit packtpub.com.


Setting Up a Development
Environment
Blynk is known as the most user-friendly IoT platform consisting of
an app builder that can be run on iOS and Android operating
systems, and a set of libraries to build amazing IoT applications in
minutes with your favorite hardware platform. It allows you to
quickly build interfaces by simply dragging and dropping widgets to
control and monitor your hardware projects from your iOS and
Android device.

In this chapter, you will learn about:

Hardware platforms, connection types, architecture, ecosystem,


and online resources
Installing Blynk app builder on Android
Creating a user account with the Blynk app builder to log in to
Blynk Cloud
Creating a new project with Blynk
Preparing Raspberry Pi by adding SD card, Ethernet cable, Wi-Fi
dongle, and power supply
Writing Raspbian Stretch Lite on Raspberry Pi by flashing image
to SD card with Etcher
Configuring SSH on Raspberry Pi
Installing prerequisite packages such as git-core and WiringPi on
Raspberry Pi
Using PuTTY to connect with Raspberry Pi with SSH protocol
Configuring wireless connection on Raspberry Pi for Raspbian
Stretch Lite
Connecting Raspberry Pi with Blynk Cloud by running the
sample C++ source file
What is Blynk?
Blynk was born as a Kickstarter project created by Pasha Baiborodin,
and backed by 2,321 supporters who pledged $49,235 to help bring
it to life. This is more than the finally announced stretched goal that
is $26,000. Blynk is one of the successfully completed projects listed
on Kickstarter (https://www.kickstarter.com/):

Kickstarter campaign page for Blynk


Hardware platforms
Blynk supports hardware platforms such as Arduino, Raspberry Pi,
and similar microcontroller boards to build hardware for your
projects. The following is a list of some microcontroller boards that
can be coupled with Blynk:

Espressif (ESP8266, ESP32, NodeMCU, WeMos D1, Adafruit


HUZZAH, SparkFun Blynk Board, SparkFun ESP8266 Thing)
Linux (C++) (Raspberry Pi, Ubuntu)
Arduino (Arduino UNO, Arduino MKR1000, Arduino MKRZero,
Arduino Yun, Arduino 101, Arduino Zero, Arduino M0, Arduino
M0 Pro, Arduino Nano, Arduino Leonardo, Arduino Due, Arduino
Mega 2560, Arduino Mega 1280, Arduino Mega ADK, Arduino
Micro, Arduino Pro Micro, Arduino Mini, Arduino Pro Mini,
Arduino Fio, Arduino Decimilia, Arduino Duemilanove, Arduino
Pro, Arduino Ethernet, Arduino Leonardo ETH, Arduino
Industrial 101)
Particle (particle core, particle photon, particle electron)

You can read the list of up-to-date hardware that you can use with
Blynk at
https://github.com/blynkkk/blynkkk.github.io/blob
/master/SupportedHardware.md.
Connection types
Blynk supports the following connection types to connect your
microcontroller board (hardware) with the Blynk Cloud and Blynk's
personal server:

Ethernet
Wi-Fi
Bluetooth
Cellular
Serial

However, throughout this book, you will only focus on Wi-Fi and
Ethernet connection types to connect with Blynk Cloud and Blynk's
personal server.
Blynk architecture
The Blynk platform includes the following components:

Blynk app builder: Allows to you build apps for your projects
using various widgets. It is available for Android and iOS
platforms.
Blynk server: Responsible for all the communications between
your mobile device that's running the Blynk app and the
hardware. You can use the Blynk Cloud or run your private
Blynk server locally. It's open source, could easily handle
thousands of devices, and can even be launched on a Raspberry
Pi.
Blynk libraries: Enables communication with the server and
processes all the incoming and outcoming commands from your
Blynk app and the hardware. They are available for all the
popular hardware platforms.

All the aforementioned components communicate with each other to


build a fully functional IoT application that can be controlled from
anywhere through a preconfigured connectivity type. You can control
your hardware from the Blynk app running on your mobile device
through the Blynk Cloud or Blynk's personal server. It works the
same in the opposite direction by sending rows of processed data
from hardware to your Blynk app.
Blynk ecosystem
The Blynk ecosystem consists of the following partners. They can
cover anything from electronic components, to manufacturing and
data plans:

Intel IoT Solutions Alliance


SparkFun Electronics
Espressif
Arduino
Texas Instruments
Proximus
Deutshe Telekom
Particle
Samsung
littleBits
Hologram
ThingSpeak.com
Electric Imp
Punch Through
Codebender
RedBearLab
Wicked device
TinyCircuits
Online resources
Blynk provides the following online resources through their website:

Getting started: Guides you how to connect your Arduino with


Blynk Cloud by writing sketch with Arduino's Integrated
Development Environment (IDE)
(http://www.blynk.cc/getting-started).
Documentation: Provides a comprehensive documentation
about how to work with the Blynk app builder, Blynk libraries,
Blynk Cloud, and Blynk's personal server. This guide mainly
focuses on the Arduino development environment
(http://docs.blynk.cc/).
Forum: There are thousands of people around the globe who
are willing to help your Blynk projects through this conversation
board. You can register with the Blynk forum by creating a new
account with it, posting your questions, discussing with experts,
helping others, and sharing your work with others
(http://community.blynk.cc/).
The Blynk app builder
The Blynk app builder provides an easy way to build IoT apps that
can be run on smartphones and tablets. It provides a predefined set
of draggable and droppable modules known as widgets, and allows
the users to make further configuration on widgets with an easy-to-
use user interface. Using the app builder, you can build apps for your
personal use or business purposes, as shown in the following
screenshot.

If you want to build an app with Blynk for business purposes, visit
http://www.blynk.io/business/ for more information:
Blynk widget Box
Installing the Blynk app
builder
The Blynk app builder is currently available for Android and iOS
platforms. The following steps explain how to install the Blynk app
builder on your Android smartphone or tablet:

1. Tap the apps icon in the lower-right corner of the home screen
(consider that this is the default location).
2. Swipe left and right until you find the Play Store icon.
3. Tap the Play Store icon.
4. The first time you open the Play Store, you may be prompted to
sign in with your Google credentials. If you still don't have a
Google account, you can create a free account with Google.
5. Once you sign in with Google Play Store, you can search for a
specific app.
6. Tap the magnifying glass in the upper-right corner, type in the
name blynk, and tap the magnifying glass on the keyboard to
execute the search. You will get a result on the screen as
follows:
Search results for Blynk
7. Tap INSTALL to start the installation process. Also, you can find
more information about the app by tapping the MORE INFO
button:
Installing Blynk app

8. Tap ACCEPT to allow the Blynk app to access some resources on


your mobile device:
Random documents with unrelated
content Scribd suggests to you:
"You find pretty much the same as you do in Malacca or Siam," was the reply.
"There are plenty of elephants of the same species as on the main-land, and
there is any number of tigers. They are very large, and proportionally fierce,
and a great many of the natives are eaten by them every year. They do not
often attack white men, but I had a close escape one evening from being
eaten by one of them."
"How did that happen?"
"I had been visiting a planter of my acquaintance, and we did not separate till
about dark. I had a ride of six or eight miles before me to reach the house
where I was to stay for the night, but did not mind it in the least, as I had
been over the ground before, and had no fear of losing my way. My friend
cautioned me to look out for tigers, but I only laughed when he said so, as I
had no idea that a tiger would attack a man on horseback.
"I was cantering gently along, when all at once my pony began to prick his
ears and sniff the air, as though all was not right. Every moment he was more
and more uneasy, and he exerted himself to the utmost to make good time
over the road. Never in my life was I carried faster by a horse than on that
occasion.

CHASED BY A TIGER.
"In a few minutes I heard the growl of a tiger, who was in full pursuit, and
gaining at every stride. The road led to a creek, and it occurred to me that my
whole safety consisted in reaching that creek before the tiger reached me. I
threw my hat off to amuse the beast for a moment, and it gave my horse just
the time he needed without a second to spare. The tiger did not try to follow
through the water, and when I got to the house where I was to stay, I
resolved not to venture again on that road after dark.
"Some of my friends were unkind enough to say that perhaps I was mistaken
in the whole matter, and that the horse took fright at a thorn catching under
the saddle-girth as we went through the jungle; so the next morning I invited
one of them to go with me to the creek, and to the spot where I threw away
my hat. The fragments of the hat were there, where the tiger had torn it in
his rage, and the tracks of the beast were visible in the soft earth. From the
extent of his foot-prints he was evidently of the largest size, and would have
made short work of a man when once he had settled his teeth into his throat.
It was the narrowest escape I ever had in my life. I have been treed by a
bear, but the sensation was nothing compared to that of being chased by a
tiger."
"Please tell us," said Fred, "how you happened to be treed by a bear."
"Certainly," said the gentleman; "but the story has nothing to do with Sumatra
or any other island of the Malay Archipelago. It was in America that the
incident happened.
"I was out hunting one afternoon, and had only a small fowling-piece loaded
with bird-shot. Suddenly I came across a black bear, and very foolishly fired at
him. The shot enraged him, and he ran for me.
"I ran a few yards, and knew that every moment he
was gaining on me. I dropped my gun, and sprung
for the nearest tree; I was young and active, and
went up several feet at the first bound. It was a
smooth sapling, with the lower part quite free from
limbs, and I soon found that it was no easy matter
to climb after the first spurt was over. The bear
followed me, and had the advantage of claws; and
he came on faster than was agreeable. I knew that
a friend of mine was not far off, and I shouted with
all the power of my lungs. He heard me, and came
to my relief; and, just as the bear had taken me by
the coat-tail, I heard a shot, and the beast tumbled
to the ground. I don't like bear-hunting in that
shape."
Fred inquired if there were any snakes in Sumatra.
"Yes, snakes in abundance," was the response;
TREED BY A BEAR. "and they sometimes grow to an enormous size. In
some respects, Sumatra is the paradise of snakes,
as they have a hot climate, and can always find plenty to eat."
"What kind of snakes do they have there?" queried Fred.
"The largest is the boa-constrictor," said the gentleman; "and I do not believe
he grows to a greater size in any other part of the world."
"What is the greatest length you have ever known for one of these snakes?"
Frank asked.
"The longest I ever saw was one that I killed myself. I was out hunting, and
had three or four natives to carry my gun and other things, when suddenly
one of them shouted, and pointed to a tree.
"I looked, and saw an enormous snake coiled up there, with his head over a
limb, and evidently watching us as we approached.
"Du Chaillu and other hunters of experience say that the best thing for
shooting a snake is not a bullet, but a charge of small shot, such as we use in
duck-hunting. So I gave my rifle to one of the natives, and called for my
fowling-piece.

SHOOTING A BOA-CONSTRICTOR.
"I managed to get around in order to have a good aim, and ventured so close
to the snake that the natives warned me to be careful. I watched my chance,
and just as the fellow darted his head forward I fired.
"My aim was accurate, and the snake's head was blown into a shapeless
mass. He threw himself from the tree, and writhed on the ground, while I
retired with my party to a safe distance. We watched him twisting his body
into many shapes, and tearing up the small trees and bushes as he wound
around them. In about an hour I continued my hunt, leaving one of the
natives to watch the snake, so that we could skin him when he was done
writhing.

A SNAKY CREEK.
"Wishing to explore a small creek, I sent another of the men to bring a boat;
and he soon returned with it. It must have been a great day for snakes, as we
had not gone far before the water seemed to be alive with them. They were
of all the colors of the rainbow; and some of them had shades that the
rainbow never possessed. The largest I should judge to have been eight or
ten feet in length, but I had no opportunity to measure him.
"One tried to get into the boat, and I shot him just as he raised his head over
the bow; others swum close to the boat, and seemed in no hurry to get out of
our way. There was a large boa, or python, coiled around a tree that
overhung a bank; he darted his head rather defiantly, but made no other
demonstration. I was quite willing to let him alone, provided he would be
equally polite to me; and, as he manifested no intention of attacking us, I did
not fire on him.
"We went back late in the afternoon, and found that our great boa had
ceased his twistings, and was sufficiently quiet to be skinned. He measured
thirty feet and a few inches in length, and was certainly one of the largest of
his kind. He could kill and eat an ordinary-sized cow or bullock; and, as for a
dog or monkey, he would dispose of one without the slightest trouble. The
favorite food of this snake is the monkey; and he captures him by lying
concealed among the trees, and waiting patiently till the monkey comes
within his reach."
MONKEY EXAMINING A TORTOISE.
"Then there are monkeys in Sumatra?" said one of the boys.
"Certainly," was the reply, "there are monkeys in abundance. The naturalists
have found no less than eleven distinct species of the monkey family, and it is
thought there are several yet undiscovered in the forests. There is one
monkey called the simiang, that has tremendously long arms; Mr. Wallace
measured one that was only three feet high, but his arms were five and a half
feet when stretched out. This monkey will swing himself from one tree to
another with the utmost ease, over distances that most of the other monkeys
would hardly venture to go."
"Do they find the variety of monkey known as the orang-outang in Sumatra?"
one of the boys asked.
"Yes," said their informer, "the animal is found only in Sumatra and Borneo,
but he is rarely seen on the first-named island. In parts of Borneo he is quite
abundant; and the most of the specimens in the museums all over the world
came from that wild region."
Frank asked how large was the largest of these beasts that had been captured
and measured.
FEMALE ORANG-OUTANG.

(From a Photograph.)
"As to that," said the gentleman, "there is a considerable conflict of testimony.
Mr. Wallace says that the largest killed by him during his stay in Borneo was
four feet two inches from head to heel; and his outstretched arms were seven
feet nine inches from tip to tip of his fingers. The face was thirteen inches
wide, and the body measured forty-three inches around. Mr. Wallace further
says that he measured seventeen freshly-killed orangs, and the skeletons of
two others; sixteen were full-grown adults—nine males and seven females.
The males varied from four feet one inch to four feet two inches in height;
and the outstretched arms from seven feet two inches to seven feet eight
inches. The measurements of other naturalists closely agree with his, and he
therefore concludes that the stories of orangs exceeding five feet in height are
extremely doubtful.
NATIVES OF BORNEO FIGHTING
WITH AN ORANG-OUTANG.
"The natives say the orang is king of the forest, and the only animals that
venture to attack it are the crocodile and the python. They only do so on rare
occasions, and are apt to get the worst of the battle whenever they provoke
it. One of the native chiefs says that when food is scarce in the forest, the
orang goes to the banks of the streams to feed on the lilies, and in such cases
he is sometimes attacked by the crocodile. His arms are so strong that he has
been known to pull the crocodile's jaws open, and rip up his throat; the chief
claims to have witnessed such a fight, which occurred on the bank of a
stream, and was won in a short time by the orang.
"The same chief said that the python found his match in the orang—the latter
biting the python's throat, and tearing him with his powerful claws. The
natives have a great dread of the orang, unless they have the advantage of
fire-arms; they sometimes attack him with their spears and hatchets, but they
do so with reluctance, as some of them are apt to be severely wounded, if not
killed outright in the encounter."
Fred wanted to know if the animal they were discussing was in the habit of
walking erect like a man, as he had seen represented in pictures.
"The best authorities say he does not," was the reply; "and I think that such
pictures as you mention are far more imaginary than real. He spends nearly
all his time in the trees, and when he goes through the forest he moves from
one tree to another by following the limbs that interlace. He feeds in the trees
in the daytime, and sleeps there at night; his bed is composed of leaves
gathered together in the fork of a tree, and he never remains long in one
spot. The natives say he finds a new resting-place and makes a new bed
every night; but there is some doubt as to the correctness of this theory.
When he has been wounded, and feels faint from loss of blood, he will gather
a quantity of leaves and form a bed, where he lies down and dies. In such a
case the tree must be cut down to get his body, as no amount of shaking will
dislodge it; or the natives must be hired to climb up and remove it. This they
will not do readily, as the animal has great vitality, and has been known to
spring up suddenly and do a great deal of damage after he was supposed to
be dead."
"There are some other curious products of this tropical region," said the
narrator, "which I will endeavor to describe briefly. There is a frog that flies
through the air, and—"
"How funny!" Fred exclaimed. "A flying-frog! He ought to be a relative of the
fish that climbs a tree, and travels on dry land."
A FLYING-FROG.
"Whether he is a relative or not of that fish, I am unable to say," was the
reply, "but that he exists there is no doubt. He comes down from the top of a
high tree to the ground in a slanting direction, just as you have seen a flying-
squirrel go from one tree to another. His toes are very long, and webbed to
their extremities. The body of the frog is about four inches long, and when
spread out the webs of his feet have a square surface of at least twelve
inches. This is much more than he needs for swimming, and we must,
therefore, conclude that Nature has thus equipped him so that he can fly
through the air.
"There are many varieties of butterflies in Sumatra, and some of them are
very beautiful. All the tropical islands abound in butterflies, that arouse the
enthusiasm of the naturalist by the brilliancy of their colors and the great size
they attain. There are numerous birds, especially of the parrot family, and
sometimes you will see hundreds of them in a walk of an hour or more
through the forests where they live. The parrot is inclined to be sociable, and
likes his fellow-parrots; you will rarely see one of these birds quite alone, and
when you do, you may conclude that the occurrence is an accidental one.
"Among the habits of birds there is none more singular than that of the
Sumatran hornbill."
"What is that?" Frank inquired.
"The hornbill, whose scientific name is Buceros bicornis, makes its nest in a
hole in a tree. When the female has laid an egg, the male plasters up the
entrance of the hole with mud, and keeps his mate there until the young bird
has been reared to the proper age for coming out in the world."
"How does she manage to live all that time?" said one of the boys.
"The hole is not entirely closed," was the reply. "A small opening is left, and
through it the male bird feeds her, and he is constantly on duty around the
outside of the nest to protect her from harm. When the young bird begins to
eat, the mother takes in her beak the food which her mate has brought, and
gives the youth his proper allowance. He is a funny-looking fellow when about
half grown; his body is plump and soft, without a single feather, and his skin
is half transparent, so that you almost expect to see through it."
"A remarkable bird," said Fred.
"And a remarkable country he lives in," Frank replied.
And with this comment the conversation about Sumatra and its products came
to an end, with a vote of thanks on the part of the boys to their amiable
informant.

A SUMATRAN BUTTERFLY.
CHAPTER XXV.
ARRIVAL IN JAVA.—SIGHTS AND SCENES IN
BATAVIA.
At daylight the next morning the boys were on deck for their first sight of
Java. They could see nothing but a low coast, like that of Siam, with a fringe
of tropical trees, and a backing of mountains in the distance. They had
expected to go into a snug harbor, but found that the harbor of Batavia is
more imaginary than real, as it is little better than a shallow roadstead, where
ships of deep draught must anchor far from shore.
The steamer came to her resting-place, and the anchor went plunging down
to its muddy bed. A noisy little steam-launch came to carry the mails ashore,
but our friends were not allowed to take passage in her; they were told there
would be a steamer for the passengers in an hour or two, or, if they preferred,
they could go ashore on a native boat.
They chose the latter conveyance, as the time of waiting for the steamboat
was a trifle uncertain; and, besides, they desired to get to land as speedily as
possible. There were a dozen boats hovering around the steamer, and it did
not take long to make a bargain; for three florins—a Dutch florin is equal to
forty cents of our money—they were to be carried to the "Boom," or custom-
house, where their baggage would be examined, and they could find
conveyance to the hotel. As soon as the bargain was made their baggage was
lowered into the boat, and they were off.
It was a long pull, and the sun was hot. Our friends reclined under their
umbrellas, and tried to be comfortable; and the boys wondered how the
boatmen could pull away so cheerily and not be fatigued. The Doctor
reminded them that the men had been accustomed all their lives to the
climate of Java; and what seemed very severe to strangers from the North
was nothing to those who were used to it. The men evidently understood the
subject of conversation, as they offered to pull twice as fast for another florin;
their proposal was declined, as none of the newcomers wished to be the
cause, however indirectly, of a sunstroke among the natives.
ARRIVAL IN PORT.
It was a journey of three miles from the steamer to the custom-house, partly
in the harbor and partly in a canal. The canal is pushed out a considerable
distance into the harbor by means of stone dikes; and the space between
these dikes is dredged to a depth of twelve or fourteen feet. Nothing but
small craft can come up to the docks; heavy sea-going ships, whether steam
or sail, must anchor in the harbor, and their cargoes are transferred by
lighters.
As soon as they reached the end of the wall that forms the canal the boatmen
drew up against it, and for the rest of the way the boat was towed, or
"trecked." This mode of propulsion was easier and faster than rowing, and
partly accounted for the proposal of the boatmen to double their speed, as
they were near the end of their rowing when they suggested it. At the
custom-house the trunks and valises were subjected to a slight examination;
there was a polite official who spoke English; and on learning that our friends
had only come for a brief visit to Java, and had no business to transact, he
assured them that all was right. He asked for their passports, and said it
would be necessary to get a permit to remain on the island, especially if they
wished to travel in the interior. This they could easily do, he said, through
their consul; and then he informed them that the formalities of the custom-
house were ended.
THE CARRIAGE AT THE
CUSTOM-HOUSE.
A runner was there from the hotel they intended to patronize, and so they
gave their property into his hands. It was piled on a cart and sent off, and
then the runner led the way to a carriage that was standing near. It was a
sort of Victoria, that could accommodate two persons comfortably; and there
was an extra seat just behind the driver, which could be turned down and
made to hold a third passenger in an emergency. The horses were diminutive
beasts, with harnesses in the European style; and the driver was a withered
specimen of a Javanese, wearing an ancient hat decorated with a cockade,
and having the brim turned so that it would not impede the view in any
direction. Fred thought the hat had come from Holland about the middle of
the century, after doing duty in a respectable family of Amsterdam for at least
a dozen years. Frank remarked that the hat was hardly less antique than the
head it covered; and the skin of the one seemed as much glazed as the other.
THE NATIONAL TASTE.
It was nearly, if not quite, three miles from the custom-house to the hotel,
and the little horses went over the ground at a surprising rate, when their size
and appearance were considered. For much of the way the drive followed the
bank of a canal, where they saw groups of men and women engaged in
washing clothes or taking a morning bath. Batavia is on level ground, the
same as Amsterdam; and the Dutch have tried to make it seem as much like
home as possible by supplying it with canals. They have carried many of their
customs with them in emigrating to the East, and sometimes to their
disadvantage. For instance, they adhere with unflinching firmness to the old
practice of taking a glass of schnapps before every meal, forgetting that what
may be allowable in a cold country is the reverse of beneficial in a hot one.
Our friends reached the hotel a little while before the mid-day meal was
served, and they were hardly inside the door of their rooms before a servant
came with glasses of a fiery liquid to enable them to get up an appetite. He
was somewhat surprised when they declined what was considered so
necessary to the health.
The hotel covered an immense area, as it consisted of a series of bungalows
of one story, with a central building, where the dining-room and the offices of
the manager were located. Between the rows of bungalows there were shade-
trees and paved walks, and along the front of each house there was a wide
veranda, where the occupants could sit or recline in the open air whenever
they chose to do so. The central building was two stories high; all the lower
part was taken up for the dining-room and parlors, while the upper floor was
occupied by patrons. Our friends were assigned to rooms in one of the
bungalows, and a barefooted servant came to assist them in arranging their
effects, and bring whatever they desired.
The servant was of a type new to our friends, and
Frank proceeded to make a sketch of him at the first
opportunity. He was a Javanese Malay, with features
not unlike those of the Malays of Singapore, but his
dress was different. He wore trousers of striped
cotton, rather narrow in the legs, and without any
nicety of fit; above the trousers he had a gaudy
shirt, with an embroidered front, and a short jacket
of material similar to that of the trousers. Wrapped
around his waist, and falling to the knee, he had a
skirt that appeared to have been cut from the gayest
piece of calico that ever came from the looms of
Manchester or Lowell; and it was held in place by a
belt. This part of the Malay wardrobe is called a
THEIR SERVANT.
sarong, and is worn by both sexes; it is usually
fastened by tying a knot in one corner, and then
drawing the sarong tightly around the waist. The knot is passed under the
straightened edge of the garment, and is not likely to slip out of place.
Accompanying this servant there was a small boy whose business it was to
bring cigars, and fire for lighting them. It seemed to Frank and Fred that the
Dutchmen of Batavia were smoking all the time; and Fred suggested that, if
the days were as long, there would be exactly as much smoking.
Breakfast was served in the room we have mentioned, and Doctor Bronson
and the boys were shown to the seats assigned to them. Frank made a
discovery that amused him greatly, and was equally entertaining to his cousin
when he learned of it. It was so unlike the custom of any hotel he had ever
seen, that he made a note of it to include in his next letter. Here it is:
"The three of us have one servant; and, as far as I can see, he waits on no
one else. In each of our rooms there is a little closet, and in this closet there
are knives, forks, spoons, plates, etc., for one person. Before breakfast or
dinner our servant takes these things to the general table, and when the meal
is over he brings them back again, and returns them to their places in the
closets. He is responsible for breakage, and is required to keep the articles
clean. The only dishes that go to the kitchen of the hotel are the platters,
tureens, and similar things, on which the food is brought from the place of
cooking."
Fred was busy with his eyes and ears during breakfast, and contributed to the
general fund of information as follows:
"The first solid meal of the day in Batavia is called the rys-taffel, or rice-table.
It is served about eleven o'clock; and its name goes far to describe its
character, as it consists largely of rice. This is the way they serve it:
"The rice is boiled in such a way that each grain is separate from every other.
It is served hot in a large dish, and you help yourself into a soup-plate of
goodly size.

THE
MANGO.
"One servant hands you the rice, and when you have filled your plate with it
another servant offers you a round platter or tray, eighteen or twenty inches
across, and divided into a dozen compartments. These compartments contain
various seasonings, and you may take any or all, or none of them, at your
pleasure, and in quantities to suit you. You have chutney, which is a sharp
sauce from India; you have red or green peppers, cut into a fine hash, red
pepper mixed with water to form a paste, cocoa-nut grated fine, preserved
ginger-root, sliced mangoes, English pickles, salt fish dried to a crisp, capers,
and other hot and spicy things peculiar to the East.
"When you have taken what you want from the tray, the servant moves on,
and another takes his place. He offers you soft eggs, either boiled or poached,
and you are expected to take one or two of the eggs to mix with your rice.
Then comes a servant with a plate of some kind of meat, cut into small
pieces, and stewed with curry-powder; and behind him is another servant
with a plate of some kind of vegetable, which has been stewed in curry. Then
they offer you cold chicken or ham, or some other meat, to put on a small
plate at your side, and your supply of food is completed, with the addition of
all the bread you want. You mix all the things you have in your large soup-
plate into a thick mass, like yellow paste, and eat with a spoon.
A LITTLE TOO PEPPERY.
"This is the famous Java curry; and if you have taken plenty of the pepper
and chutney, and other hot things, your mouth will burn for half an hour as
though you had drunk from a kettle of boiling water. And when you have
eaten freely of curry, you don't want any other breakfast. Everybody eats
curry here daily, because it is said to be good for the health by keeping the
liver active, and preventing fevers."
After breakfast our friends went to their rooms, and soon afterwards met on
the veranda to arrange plans for seeing Batavia. Somewhat to their surprise,
they learned that it was not fashionable to be seen out till three o'clock in the
afternoon, and they must not call on any one during the middle of the day.
The Doctor said that the Dutch and other foreign inhabitants of the city were
supposed to sleep two or three hours while the sun was high in the heavens;
but as they were strangers, and had little time at their disposal, they would
get a carriage and take a drive.
AFTER BREAKFAST.
Neither ladies nor gentlemen are visible in Batavia between breakfast and
three p.m.; or if they show themselves they are not acting according to
custom. They lounge in bed or hammock, or in their bamboo arm-chairs, and
try to get as much rest as possible to fit them for the fatigues of the evening.
It is this habit of sleeping in the daytime that enables the fashionable
Batavians to keep very late hours. They are accustomed to rise early; and by
five o'clock in the morning half the people in the hotel were out of bed, and
the rest of them before six.
Frank and Fred were awakened on their
first morning in Batavia before they
thought the hour of rising had arrived.
The Doctor told them they had best
conform to the custom, and so they crept
from their beds and prepared to dress.
"That is unnecessary," said the Doctor; "it
is perfectly proper for you to come out in
your sleeping-suits, and sit in front of
your rooms, or go to your baths. You will
find that is what everybody else is doing."
AN EARLY CALL.
Accordingly they made their appearance
in their pajamas, and found that the
servant was ready to attend upon them. All around they could hear men
calling "api!" "api!" and they naturally asked what "api" meant.
"It is the Malay word for 'light' or 'fire,'" said the Doctor; "and the call you
hear is for a light for a cigar or cigarette."
When they went to the row of bath-rooms fronting their apartments, the boys
looked for bathing-tubs, but found none. Each bath-room had a faucet
whence water could be drawn, or it contained a barrel and a dipper, but no
other furniture.
The bathing custom in Java is to pour water over the body, and not to plunge
into a tub. A tub can be had by any one who asks for it; but he runs the risk
of being considered a barbarian, who cannot be weaned from the absurd
customs of his native land.
After the bath came the "little breakfast," as it is called by the residents,
consisting of tea or coffee, with eggs or cold meat, and a few biscuits. When
this was ended Doctor Bronson ordered a carriage, and the morning hours
were devoted to a drive.
"We have not quite time," said the Doctor, "to exhaust a single course with
the carriage between this and the hour for the rys taffel."
The boys could not understand his meaning, until he explained that the rules
governing the hire of carriages in Batavia are somewhat curious. "The tariff
for a Victoria," said he, "is four florins or guilders—about one dollar and sixty
cents of our money, and if you only ride a few blocks you must pay that price.
But you can, if you choose, keep it for six hours without any extra charge,
except that the driver will expect an allowance of an hour or so to rest his
horses, and a little money for himself by way of remembrance."
"What an odd arrangement!" said Frank.
Fred agreed with him fully, and probably every traveller who visits Batavia will
not be long in coming to the same conclusion.
"When I was here before," continued the Doctor, "I took a carriage one
morning for the customary six hours, and went out for a drive. At the end of
three hours I returned to the hotel for breakfast, and told the driver he could
have an hour to himself and then return. He did not come again, and when I
asked at the office of the hotel the manager said he would investigate the
affair. In the evening he told me he had seen the driver, and paid him, and his
reason for not returning was that his horses were tired.
"I thought no more of the matter till I settled my bill the next day, preparatory
to going into the country, and found that the full tariff of four guilders had
been charged for the carriage. I protested that the man was not entitled to
that amount, because he had not given me the stipulated service. The
manager said he had paid the bill because that was the law; and he added
that the driver would have served me the full time if his horses had not been
tired.
"In vain did I protest that I had been unjustly treated; the only answer I could
get from the manager was, 'The driver's horses were tired—his horses were
tired.' I vowed that the next time I employed a carriage in Batavia I would
adhere rigidly to the law, and keep it in my sight for the full six hours,
whether I wanted it or not. If the driver serves us well to-day, perhaps he will
get an allowance; but if he is obstinate, as these Malay drivers sometimes are,
I shall feel like enforcing the law to the letter."
They were fortunate in finding a very amiable driver, who did his best to make
the strangers enjoy their ride. He spoke only the Malay language; but, in spite
of the absence of a common tongue, he managed to make them understand
his explanations, and to show them a good deal of Batavia. The result was
that they gave him an hour to spare, and an extra florin for the trouble he
had taken.
Here is what Frank wrote in his note-book concerning their first morning's ride
in Batavia:
NATIVE HOUSE ON THE RIVER THAT
FEEDS THE CANAL.
"Batavia covers a great extent of ground, and is fairly entitled to be called a
city of magnificent distances. The old city near the sea is rather closely built,
but it is not inhabited by Europeans to any extent. The Dutch, English, and
other foreign merchants transact business there during the day; but they live
in the new part of Batavia, which spreads over the flat ground for several
square miles. The houses are rarely of more than one story, as the country is
subject to earthquakes, and nobody wants to have a flight of stairs between
him and the ground when these shakings begin. Nearly every house has a
campong, or yard, around it, and this yard is filled with tropical trees in
considerable variety. The great streets and roads are liberally provided with
shade-trees, so that Batavia can hardly be seen, owing to the impossibility of
peering through the dense foliage that is before you at every step.
"A canal with several branches runs through all this level area that they call
Batavia, and for miles and miles it is built up with solid stone walls. It is fed by
a small river coming down from the mountains, and serves a triple purpose:
boats may navigate it; people may bathe there, or wash clothes in it; and the
sewage of the city is said to be drained into it. Whether the water for
household use is taken from it or not, I am unable to say; but we repeatedly
saw Malay servants filling buckets with it, and then walking off in the direction
of the houses. Circumstantial evidence was against them; but the clerk of the
hotel says the water they were carrying was to be used for washing the floors
of the houses and sprinkling the gravel-walks in the court-yards. Perhaps it is
the suspicion that the water may be used for drinking purposes that leads so
many of the inhabitants to shun it, and take seltzer, gin, claret, and other
imported liquids to quench their thirst.
"They have a street railway here, but it is patronized only by the natives, the
Chinese, and the low class of foreigners. The track is good enough, but the
cars are the wildest contrivances you ever saw; they are common freight-cars
fitted with rush seats, and their great weight makes them difficult to move
along the way. Perhaps, if they had the proper kind of cars, the Europeans
would ride in them, but they could hardly expect to patronize those now in
use.
"It was a funny sight, when we were driving along the streets, to see the
ladies out for their morning promenade, with their hair streaming down their
shoulders, their bodies enclosed only in light wrappers, with loose sacks
buttoned to the throat, and with slippers, but no stockings, on their feet. Most
of them wore the sarong, or native petticoat, and they generally carried
parasols to keep off the sun. This is the forenoon costume of the ladies before
they go to breakfast, and it strikes a foreigner as very odd.
FAMILY PARTY IN BATAVIA.
"Sometimes we saw a whole family sitting on the veranda of a house, in full
view of everybody passing along the street, looking as if they had just got out
of bed and were only half dressed. The men would be in dressing-gowns or
pajamas, and the ladies with their hair down, as I have described, or twisted
up into tight little lumps, so that the owners might appear in the afternoon
with a fine stock of curls. Occasionally we saw some fat, jolly old women with
their hair cut close to the head, in order to keep off as much of the heat as
possible.
FAN-PALM IN THE BOTANICAL GARDEN.
"We visited the museum and the botanical garden, and found them quite
interesting. The museum contains the products of Java, arranged so that you
can readily see what the resources of the island are; and there are relics of
ancient times that throw light upon the history of the country and its people.
The botanical garden abounds in tropical plants, and reminded us of the
garden at Singapore; but we had not time to make a list of its contents. We
saw some fine specimens of a tree that had already attracted our attention at
Singapore—the 'fan-palm,' or traveller's fountain, as it is called. It spreads out
like a huge fan, with the lower part of the stalks quite bare, while the ends
are formed exactly like feathers. A small tree of this species would make a
very good fan for a giant, such as we read of in Gulliver's travels.
CHINESE PORTERS.
"In the old part of Batavia we saw so many Chinese that it would not have
required a great stretch of the imagination to believe that we were once more
in the Flowery Kingdom. In one of the narrowest streets we met a couple of
Chinese porters carrying a burden suspended from a pole, the same as we
had seen them in Canton and Shanghai, and if it had not been that our driver
was very careful we might have run over them. The Chinese are very
numerous in Batavia, and all through Java, and a great deal of the commercial
business of the country is in their hands. They are engaged in all kinds of
trade where money is to be made, and they have the same guilds and
commercial associations that they have in Singapore, Hong-kong, and
elsewhere. They have their temples and idols just as at home; and though
many of them were born in Java, and will probably never see the soil of
China, they are as thoroughly Chinese as though they were reared within the
walls of Canton.
GODDESS OF SAILORS AND HER
ASSISTANTS.
"One of the most common of the Chinese temples is that of the goddess 'Ma-
Chu,' who is worshipped by sailors and those having business on the water.
She is represented with her two assistants; one of them is called 'Favorable-
Wind-Ear,' and the other 'Thousand-Mile-Eye.' The first is supposed to have an
ear that can catch the least indication of a wind to favor the sailor; and the
latter possesses a clearness of vision that enables him to see a rock or other
danger at the distance of a thousand miles. One listens, while the other looks;
and between them they are believed able to insure a safe and speedy voyage
to all their worshippers."
As our friends were somewhat wearied with their morning's work, they
remained in-doors from the time of the "rys-taffel" till three o'clock. Then they
followed the custom of the country by taking a bath, and dressing for dinner;
and after dinner they continued to be in fashion by taking another drive. We
will let Fred tell the story of what they saw in the afternoon and evening.
"The fashionable hour for a promenade is after dinner, and all the ladies and
gentlemen consider it their duty to come out and be seen. There are plenty of
carriages on the streets, and also a goodly number of gentlemen on
horseback; and it is rather a pretty sight to see the gentlemen riding along by
the carriages and chatting with the ladies inside. Then there are many
pedestrians—the ladies being in light walking-dresses, and the gentlemen in
full evening costume. The odd thing about the promenades is that both sexes
are bareheaded. This is all well enough for the ladies; but it is rather strange
to see a gentleman in full dress, and carrying a cane along the street, with his
head as bare as though he was in a parlor. I am told that the ladies never
wear hats or bonnets, and that the only thing of that sort ever seen in Batavia
is when foreigners first arrive here from other parts of the world. A ladies' hat-
store in Batavia would not be a paying speculation.
"On certain evenings there is music on the King's Square; and at such times
everybody goes there to hear it. The crowd is large but very fashionable, as it
is the proper thing to go there; and no one who can get out will venture to
miss the performance. The band stops playing a little after dark, and then the
drive may be said to be at its prettiest. The footman of each carriage carries a
torch made of some resinous plant tied into a bundle, like a wisp of straw,
and, as the carriages move around and pass and repass each other, the scene
is a curious one. All the houses are a blaze of light, as the wide verandas are
hung with lamps, and the whole family is gathered there when not out for the
drive. The veranda is the general sitting-room, as everybody prefers it to the
parlor on account of its being so much cooler.
"Perhaps you are wondering when the men find time for business. Well, they
transact most of it in the forenoon, but their offices are open in the afternoon
in charge of the clerks. For the clerks there is no such resting-time as I have
described, or at best, only a short one, in the middle of the day. When a
young man comes out here to seek his fortune, he must do pretty much as he
would at home for the first year or two; when he is fairly established, he can
have his time in the middle of the day, and live like other people."
CHAPTER XXVI.
BATAVIA TO BUITENZORG.—TROPICAL SCENES.—
BIRDS OF PARADISE.
As their time in Java was limited, our friends determined to cut short their
stay in Batavia, and go at once to the interior. Accordingly, the morning
following the day whose history was narrated in the last chapter saw them
leaving the city by railway for Buitenzorg.
Buitenzorg is about forty miles from Batavia, and the summer residence of the
Governor-general of Java; as it is summer all the year round in Java, he
spends most of his time at this country-seat, and rarely visits Batavia except
when business calls him there. The name is of Dutch origin, and signifies
"without care," in imitation of the French Sans Souci. It is about one thousand
feet above the level of the sea, and much cooler than Batavia; and the
surrounding region is one of great natural beauty.
Doctor Bronson and his young companions were early at the railway-station,
and purchased their tickets for the journey. They found three classes of
carriages on the road; the first and second being patronized by foreigners,
and the third class exclusively by natives and Chinese. For their first-class
tickets they paid six florins and thirty cents—equal to two dollars and a half of
our money. The second-class ticket costs half as much as the first, and the
third half as much as the second, so that the natives are able to ride for about
a cent and a half per mile. The third-class carriages were crowded to such an
extent that Frank and Fred both remarked that the Javanese were as prompt
as the Japanese to recognize the value of the railway. Men and women were
closely packed on the rough seats of the carriages of the third class, while
those in the first and second, especially the former, had plenty of room.
"I suppose this is so the world over," said Fred, as he contemplated the
difference between the accommodations of the various classes on the train.
"Everywhere we have been, at any rate," responded Frank.
"Whatever accommodations you wish and can pay for," said the Doctor, "you
can have. If you want a special train at the price they demand, you can have
it by paying in advance."
"It is the same in Java as in Europe, and, to
a certain extent, we have similar
arrangements in America. We are more
democratic in our ways than any other
country of importance, and consequently
have been slower to make the distinctions
in railway travel that exist in other parts of
the world. But we are steadily moving in
that direction, and in time we will have all
the distinctions of classes—special trains
and all. In fact, we have them already."
"Aren't you mistaken, Doctor?" said Fred.
"Surely we do not have three classes on
our railways at home."
"Stop and think a moment," answered the
Doctor, while there was a suggestion of a
smile about his face. "We have the ordinary
SOME OF THE THIRD-CLASS railway carriage and the Pullman car, have
PASSENGERS. we not?"
"Certainly," was the reply; "and they are
virtually two classes."
"Quite right. Then, on the principal lines of railway there are the emigrant
trains, are there not?"
Fred acknowledged that the Doctor had the best of the argument, and the
conversation came to an abrupt termination, as it was time for them to take
their places in the carriage.
Away they started for their first ride on a railway-train south of the equator.
The suburbs of the city were speedily passed, and then the train plunged into
a tropical forest. The grade became steep as the hilly ground was reached,
and two locomotives were necessary for a part of the way to pull the train up
the heavy incline. Frank observed that the carriages were quite narrow, and
he found by measuring, at the first station where they stopped, that the rails
were only three and a half feet apart. The present terminus of the line is at
Buitenzorg; but surveys have been made, and it is the intention to push the
line forward and form a connection with the system of railway in the eastern
part of the island. When this is done, a stranger will be able to travel the
whole length of Java by rail, as he can now travel by wagon road.
VIEW IN A PRIVATE GARDEN.
Since the railway from Batavia to Buitenzorg was opened several villages have
sprung into existence along the line, and some of them are quite pretty. They
contain the residences of gentlemen whose business is at Batavia, and are
generally arranged with excellent taste. The gardens are luxuriant, like nearly
all gardens in the tropics; and some of the owners delight in adding wild
animals to their collections of trees and plants.

NATIVE VILLAGE NEAR THE RAILWAY.


Then there are native villages in considerable number, some of them
concealed in the forest, and others standing in little clearings, where the trees
form an agreeable background. The train stopped frequently, and did not
seem to be in a hurry, although it was called an express, and was the fastest
on the line. Frank said that probably the heat of the tropics had the same
influence on a locomotive as on a man, and prevented its going rapidly. Fred
said that Frank's reasoning reminded him of the boy at school, who was asked
to give an illustration of the expanding power of heat, and the contracting
power of cold.
"What did he do?" Frank inquired.
"Why," responded Fred, "he thought for some minutes over the matter, and
finally answered that the days in winter were not nearly as long as those in
summer, and it must be the cold that contracted them."

TROPICAL GROWTHS ALONG THE LINE.


The boys observed that the trees in some instances grew quite close to the
track. Doctor Bronson explained to them that in the tropics it was no small
matter to keep a railway-line clear of trees and vines, and sometimes the
vines would grow over the track in a single night. It was necessary to keep
men at work along the track, to cut away the vegetation where it threatened
to interfere with the trains, and in the rainy season the force of men was
sometimes doubled. "There is one good effect," said he, "of this luxuriant
growth. The roots of the vines and trees become interlaced in the
embankment on which the road is built, and prevent its being washed away
by heavy rains. So you see there is, after all, a saving in keeping the railway
in repair."
Frank noticed that some of the telegraph-poles had little branches growing
from them; and at one place he saw a man near the top of a pole engaged in
cutting the limbs away. He called the attention of his companions to the novel
sight.
"You will see more of those trees as you go into the interior," said the Doctor.
"They grow with great rapidity; and unless the wood is thoroughly seasoned
before the poles are set in the ground, they speedily take root and become
trees again. They are more pertinacious than our American water-willows, as
they will grow in any soil, wet or dry. Wherever a clearing is made in the
forest these trees spring up as if by magic; and they run up so tall and
straight as to be just what is wanted for telegraph uses."

"MANGOSTEENS!"

You might also like