Book Image

Internet of Things Programming with JavaScript

Book Image

Internet of Things Programming with JavaScript

Overview of this book

The Internet of Things is taking the tech world by storm, and JavaScript is at its helm. This book will get you to grips with this exciting new technology. Where do Node.js, HTML5 and Windows 10 IoT Core come in with JavaScript and IoT? Why Raspberry Pi Zero rather than Arduino? How do you configure and build an IoT network from scratch? All your IoT JavaScript questions are answered in this book.
Table of Contents (15 chapters)
Internet of Things Programming with JavaScript
Credits
About the Author
www.packtpub.com
Customer Feedback
Preface

Measuring temperature, humidity, and light and displaying data on an LCD


In this section, I will teach you how to monitor temperature, humidity, and light detection on an LCD screen.

Hardware and software requirements

In this project, you will use an Arduino UNO board; but you can also use an Arduino MEGA, which also works perfectly.

For temperature reading,  we require a DHT11 sensor, a resistor of 4.7k, a photoresistor (light sensor), and a 10k resistor.

It also requires a 16 x 2 LCD screen, where you performed the tests; I used an I2C communication module for the screen interfaced with Arduino card. I recommend using this communication since only two pins of Arduino are required for sending data:

Finally, it requires a breadboard and male-male and female-male cables for connections.

Here is the list of components for the project:

  • Arduino UNO

  • Temperature and humidity sensor DHT11

  • LCD Screen 16 x 2

  • Module I2C for LCD

  • A breadboard

  • Cables

We connect the different components:

Here, we can see the image...