Book Image

Internet of Things with Python

By : Gaston C. Hillar
Book Image

Internet of Things with Python

By: Gaston C. Hillar

Overview of this book

Internet of Things (IoT) is revolutionizing the way devices/things interact with each other. And when you have IoT with Python on your side, you'll be able to build interactive objects and design them. This book lets you stay at the forefront of cutting-edge research on IoT. We'll open up the possibilities using tools that enable you to interact with the world, such as Intel Galileo Gen 2, sensors, and other hardware. You will learn how to read, write, and convert digital values to generate analog output by programming Pulse Width Modulation (PWM) in Python. You will get familiar with the complex communication system included in the board, so you can interact with any shield, actuator, or sensor. Later on, you will not only see how to work with data received from the sensors, but also perform actions by sending them to a specific shield. You'll be able to connect your IoT device to the entire world, by integrating WiFi, Bluetooth, and Internet settings. With everything ready, you will see how to work in real time on your IoT device using the MQTT protocol in python. By the end of the book, you will be able to develop IoT prototypes with Python, libraries, and tools.
Table of Contents (19 chapters)
Internet of Things with Python
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Understanding the buttons and the LEDs


The front of the board provides two buttons located at the bottom labeled REBOOT and RESET. The following image shows these two buttons:

The button labeled REBOOT resets the Intel Quark SoC X1000 application processor. The button labeled RESET resets the sketch and any shield attached to the board. In this book, we won't be working with the Arduino sketches but we might need to reset a shield.

There are five rectangular LEDs located next to the USB 2.0 host connector: two LEDs on the left-hand side of the connector and three LEDs on the right-hand side. The following are the labels and the meaning of the LEDs:

  • OC: The LED signals over-current when the board is powered through the micro USB connector. However, this feature is not enabled on Intel Galileo Gen 2 boards, and therefore, we just have the LED turned off. If the LED turns on, it means that the board is not working OK or the power supply is failing. This LED usually turns on when the board is bricked. We say a board is bricked when it doesn't work anymore and is technologically as useful as a brick.

  • USB: It is the micro USB ready LED. The LED turns on after the board has finished the boot process and allows us to connect the micro USB cable to the micro USB connection labeled USB CLIENT. We should never connect a cable to the micro USB connection before this LED turns on because we can damage the board.

  • L: The LED is connected to pin 13 of the digital I/O pins, and therefore, a high level sent to pin 13 will turn on this LED and a low level will turn it off.

  • ON: It is a power LED and indicates that the board is connected to the power supply.

  • SD: The LED indicates I/O activity with the microSD card connector, labeled SDIO, and therefore, this LED will blink whenever the board is reading or writing on the microSD card.

The following image shows the OC and USB LEDs on the left-hand side of the USB 2.0 host connector and the L, ON and SD LEDs on its right-hand side.

The board includes an integrated real-time clock, known as RTC. It is possible to connect a 3V coin-cell battery to keep the RTC operation between turn-on cycles. Unluckily, the battery is not included in the box. The two RTC coin-cell connector pins are located in the lower-left corner of the Intel Quark SoC X1000 application processor, labeled COIN and with a battery icon. The next image shows the two RTC coin-cell connector pins.