Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Python Programming for Arduino

You're reading from   Python Programming for Arduino Develop practical Internet of Things prototypes and applications with Arduino and Python

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781783285938
Length 400 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Pratik Desai Pratik Desai
Author Profile Icon Pratik Desai
Pratik Desai
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Python Programming for Arduino
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Python and Arduino FREE CHAPTER 2. Working with the Firmata Protocol and the pySerial Library 3. The First Project – Motion-triggered LEDs 4. Diving into Python-Arduino Prototyping 5. Working with the Python GUI 6. Storing and Plotting Arduino Data 7. The Midterm Project – a Portable DIY Thermostat 8. Introduction to Arduino Networking 9. Arduino and the Internet of Things 10. The Final Project – a Remote Home Monitoring System 11. Tweet-a-PowerStrip Index

Index

A

  • Amazon AWS platform
    • about / Getting familiar with the Amazon AWS platform
    • URL / Getting familiar with the Amazon AWS platform
    • account, setting up / Setting up an account on AWS
  • analog digital buzzer
    • URL / Buzzer – generating sound alarm pattern
  • architecture, IoT web applications
    • about / Architecture of IoT web applications
    • physical layer / Architecture of IoT web applications
    • computation layer / Architecture of IoT web applications
    • interfacing layer / Architecture of IoT web applications
  • Arduino
    • about / Introduction to Arduino
    • history / History
    • objectives / Why Arduino?
    • variants / Arduino variants
    • Uno board / The Arduino Uno board
    • URL, for installation on Linux / Linux
    • interfacing, with Python / Prototyping
    • computer networking / Arduino and the computer networking
  • Arduino, interfacing with Xively
    • about / Interfacing Arduino with Xively
    • Arduino data, uploading / Uploading Arduino data to Xively
    • data, downloading to Arduino / Downloading data to Arduino from Xively
    • advanced code, for data upload and download / Advanced code to upload and download data using Arduino
  • Arduino board
    • StandardFirmata sketch, uploading / Uploading a Firmata sketch to the Arduino board
    • setting up, pyFirmata methods used / Setting up the Arduino board
  • Arduino board connection
    • establishing / Connecting the Arduino board
    • establishing, on Linux / Linux
    • establishing, on Mac OS X / Mac OS X
    • establishing, on Windows / Windows
    • troubleshooting / Troubleshooting
  • Arduino code, Tweet-a-PowerStrip / The Arduino code
  • Arduino data
    • storing, in CSV file / Storing Arduino data in a CSV file
    • plotting, from CSV file / Plotting data from a CSV file
  • Arduino Ethernet library
    • about / Arduino Ethernet library
    • URL / Arduino Ethernet library
    • Ethernet class / The Ethernet class
    • IPAddress class / The IPAddress class
    • Server class / The Server class
    • Client class / The Client class
  • Arduino Ethernet Shield
    • about / Arduino Ethernet Shield
    • URL / Arduino Ethernet Shield
  • Arduino IDE
    • about / Arduino variants, Getting started with the Arduino IDE
    • installing / Installing the Arduino IDE
    • installing, on Linux / Linux
    • URL, for installation on Ubuntu / Linux
    • URL, for installation on Fedora / Linux
    • installing, on Mac OS X / Mac OS X
    • installing, on Windows / Windows
    • URL, for setup file / Windows
    • sketch / What is an Arduino sketch?
    • libraries / Working with libraries
    • examples, using / Using Arduino examples
    • URL, for built-in examples / Using Arduino examples
    • sketch, compiling / Compiling and uploading sketches
    • sketch, uploading / Compiling and uploading sketches
    • serial monitor, using / Using the Serial Monitor window
  • Arduino interrupts
    • about / Using Arduino interrupts
    • using / Using Arduino interrupts
    • reference link / Using Arduino interrupts
  • Arduino pins
    • configuring / Configuring Arduino pins
    • configuring, with direct method / The direct method
    • pin modes, assigning / Assigning pin modes
    • working with / Working with pins
    • data, reporting / Reporting data
    • monitoring / Manual operations
    • write() method, using / The write() method
    • read() method, using / The read() method
  • Arduino programming
    • about / Introduction to Arduino programming
    • comments / Comments
    • variables / Variables
    • constants / Constants
    • data types / Data types
    • conversion functions / Conversions
    • statements / Functions and statements
    • functions / Functions and statements
  • Arduino sketch, monitoring station
    • about / The Arduino sketch for the monitoring station
    • sensor information, publishing / Publishing sensor information
    • actuator actions, subscribing to / Subscribing to actuator actions
    • interrupt, programming / Programming an interrupt to handle the press of a button
  • Arduino WiFi Shield
    • about / Arduino WiFi Shield
    • URL / Arduino WiFi Shield
  • Arduino Yún
    • about / Arduino Yún
    • URL / Arduino Yún
  • array data type
    • about / Data types

B

  • BH1750 light sensor
    • interfacing, Arduino used / Arduino coding for the BH1750 light sensor
    • interfacing, PyMata library used / Interfacing BH1750 using PyMata
  • boolean data type
    • about / Data types
  • breadboard
    • using / Working with the breadboard
    • URL / Working with the breadboard
    • history / Working with the breadboard
    • reference link / Working with the breadboard
  • broker
    • about / MQTT – A lightweight messaging protocol
  • built-in functions
    • about / Built-in functions
    • conversion methods / Conversions
    • math operations / Math operations
    • string operations / String operations
    • URL / String operations
  • built-in types
    • about / Python operators and built-in types, Built-in types
    • data structures / Data structures
  • Button() widget
    • about / Learning Tkinter for GUI design, The Button() widget – interfacing GUI with Arduino and LEDs
    • using / The Button() widget – interfacing GUI with Arduino and LEDs
  • buzzer
    • using / Buzzer – generating sound alarm pattern
    • connections / Connections
    • Python code / The Python code
  • byte data type
    • about / Data types

C

  • callback
    • about / The Label() widget – monitoring I/O pins
  • Carriots
    • about / Carriots
  • char data type
    • about / Data types
  • Checkbox() widget
    • about / Learning Tkinter for GUI design
  • Checkbutton() widget
    • about / The Checkbutton() widget – selecting LEDs
    • used, for selecting LEDs / The Checkbutton() widget – selecting LEDs
  • Client class
    • about / The Client class
  • close() method
    • used, for closing file / The close() method
  • comments
    • about / Comments
    • block comment / Comments
    • single-line or inline comment / Comments
  • computer networking
    • about / Arduino and the computer networking
    • IP address, obtaining / Obtaining the IP address of your computer
    • networking extensions, for Arduino / Networking extensions for Arduino
    • Arduino Ethernet library / Arduino Ethernet library
    • web server, building with Arduino / Exercise 1 – a web server, your first Arduino network program
  • constants
    • about / Constants
  • control center, remote home monitoring system
    • about / Stage 2 – a control center using Python and the Raspberry Pi
    • architecture / The control center architecture
    • Python code / The Python code for the control center
    • GUI, creating with Tkinter / Creating the GUI using Tkinter
    • Mosquitto broker, communicating with / Communicating with the Mosquitto broker
    • system status, calculating / Calculating the system's status and situation awareness
    • Xively, communicating with / Communicating with Xively
    • buzzer status, checking / Checking and updating the buzzer's status
    • buzzer status, updating / Checking and updating the buzzer's status
    • testing, with monitoring station / Testing the control center with the monitoring station
    • setting up, on Raspberry Pi / Setting up the control center on the Raspberry Pi
  • conversion functions
    • char() / Conversions
    • byte() / Conversions
    • int() / Conversions
    • float() / Conversions
    • about / Conversions
  • CSV file
    • about / Using CSV files to store data
    • used, for storing data / Using CSV files to store data
    • Arduino data, storing / Storing Arduino data in a CSV file
    • data, plotting / Plotting data from a CSV file
  • custom cloud platform, IoT
    • configuring / Your own cloud platform for the IoT
    • Amazon AWS platform / Getting familiar with the Amazon AWS platform
  • cyber-physical systems / Architecture of IoT web applications

D

  • data structures
    • about / Data structures
    • list / Lists
    • tuples / Tuples
    • sets / Sets
    • dictionaries / Dictionaries
    • URL / Dictionaries
  • data types
    • about / Data types
    • void / Data types
    • boolean / Data types
    • byte / Data types
    • int / Data types
    • float / Data types
    • char / Data types
    • array / Data types
  • DC motors
    • using / DC motor – controlling motor speed using PWM
    • connections / Connections
    • Python code / The Python code
  • deployment stage, Tweet-a-PowerStrip
    • about / Development and deployment stages
  • design methology, IoT projects
    • about / The design methodology for IoT projects
  • development stage, Tweet-a-PowerStrip
    • about / Development and deployment stages
  • development stages, remote home monitoring system
    • defining / Defining the project development stages
  • do-it-yourself (DIY) projects
    • about / Introduction to Arduino
  • Dual in-line Package (DIP)
    • about / Working with the breadboard
  • Dynamic Host Control Protocol (DHCP)
    • about / The Ethernet class

E

  • EC2 service
    • about / Getting familiar with the Amazon AWS platform
  • electronic components
    • interfacing, with Arduino / Prototyping
  • End of Line (EOL)
    • about / Playing with a pySerial example
  • Entry() widget
    • about / Learning Tkinter for GUI design, The Entry() widget – providing manual user inputs
    • used, for providing manual user inputs / The Entry() widget – providing manual user inputs
  • Ethernet class
    • about / The Ethernet class
  • ez_setup.py file
    • URL, for downloading / Windows, Mac OS X

F

  • Fedora/Red Hat Linux
    • Python, installing / Fedora and Red Hat
  • files
    • working with / Working with files in Python
    • manipulating, with open() method / The open() method
    • write() method, using / The write() method
    • closing, close() method used / The close() method
    • read() method, using / The read() method
    • with statement, using / The with statement – Python context manager
  • Firmata
    • about / Introducing the Firmata protocol
    • URL / What is Firmata?, Testing the Firmata protocol
    • StandardFirmata sketch, uploading to Arduino board / Uploading a Firmata sketch to the Arduino board
    • testing / Testing the Firmata protocol
    • and pySerial library, bridging / Bridging pySerial and Firmata
  • Firmata libraries
    • disadvantages / Useful pySerial commands
  • float data type
    • about / Data types
  • formatting tool, SD card
    • URL, for downloading / Preparing an SD card
  • for statement
    • about / The for statement
  • Fritzing
    • about / Testing the Firmata protocol
    • using / Introducing Fritzing – a hardware prototyping software
    • URL / Introducing Fritzing – a hardware prototyping software
  • functions
    • about / Functions and statements
    • setup() function / The setup() function
    • loop() function / The loop() function
    • pinMode() function / The pinMode() function
  • functions, pins
    • digitalWrite() function / Working with pins
    • digitalRead() function / Working with pins
    • analogRead() function / Working with pins
    • analogWrite() function / Working with pins

G

  • general-purpose input/output (GPIO) pins
    • about / Hardware design
  • graphical user interfaces (GUIs)
    • about / Why we use Python
  • Grid
    • about / The Pack geometry manager
  • Grid geometry manager
    • about / The Grid geometry manager
  • GUI, thermostat
    • designing / Designing the GUI and plot in Python
    • pySerial, used for streaming sensor data / Using pySerial to stream sensor data in your Python program
    • designing, Tkinter used / Designing the GUI using Tkinter
    • percentage humidity, plotting with matplotlib / Plotting percentage humidity using matplotlib
    • button interrupts, using / Using button interrupts to control the parameters
    • button interrupts, used for changing temperature unit / Changing the temperature unit by pressing a button
    • button interrupts, used for swapping between GUI and plot / Swapping between the GUI and the plot by pressing a button

H

  • hardware components, Raspberry Pi
    • Raspberry Pi / What do you need to begin using the Raspberry Pi?
    • power cable / What do you need to begin using the Raspberry Pi?
    • display cable / What do you need to begin using the Raspberry Pi?
    • SD card / What do you need to begin using the Raspberry Pi?
    • mouse / What do you need to begin using the Raspberry Pi?
    • keyboard / What do you need to begin using the Raspberry Pi?
    • USB hub (optional) / What do you need to begin using the Raspberry Pi?
  • hardware components, remote home monitoring system
    • about / The list of required components
  • hardware components, Tweet-a-PowerStrip
    • about / Required hardware components
    • relays / Relays
    • PowerSwitch Tail / PowerSwitch Tail
  • hardware design, IoT
    • about / Hardware design, The IoT cloud platforms
  • hardware design, Tweet-a-PowerStrip
    • about / Hardware design
  • hardware system design, motion-triggered LEDs
    • Fritzing, using / Introducing Fritzing – a hardware prototyping software
    • breadboard, using / Working with the breadboard
    • hardware prototype, designing / Designing the hardware prototype
  • help() function
    • about / Plotting random numbers using matplotlib
  • HIH-4030 humidity sensor
    • using / The list of required components
  • home area network (HAN)
    • about / Networking fundamentals
  • Homebrew
    • URL, / Mac OS X
    • installing / Mac OS X

I

  • I2C protocol
    • reference link / Prototyping with the I2C protocol
  • if statement
    • about / The if statement
  • input/output (I/O) pins
    • about / Arduino variants
  • installation, Arduino IDE
    • on Linux / Linux
    • on Mac OS X / Mac OS X
    • on Windows / Windows
  • installation, paho-mqtt library / Installing paho-mqtt
  • installation, pip
    • about / Installing pip
  • installation, PubSubClient library / Installing the PubSubClient library
  • installation, pySerial library
    • about / Installing pySerial
  • installation, Python
    • about / Installing Python and Setuptools
    • on Linux / Linux
    • on Ubuntu / Ubuntu
    • on Fedora/Red Hat Linux / Fedora and Red Hat
    • on Windows / Windows
    • on Mac OS X / Mac OS X
  • installation, Python packages
    • about / Installing Python packages
  • installation, Setuptools
    • about / Installing Setuptools
    • on Linux / Linux
    • on Windows / Windows
    • on Mac OS X / Mac OS X
  • installation, web.py
    • about / Installing web.py
  • int data type
    • about / Data types
  • integrated circuit (IC)
    • about / Prototyping with the I2C protocol
  • integrated development environment (IDE)
    • about / Installing the Arduino IDE
  • integrated development environment (IDLE)
    • about / The fundamentals of Python programming
  • Internet of Things (IoT) applications
    • about / Why we use Python
  • Internet Protocol (IP)
    • about / Networking fundamentals
  • IoT
    • getting started process / Getting started with the IoT
    • hardware design / Hardware design, The IoT cloud platforms
    • cloud applications, developing with Python and Xively / Developing cloud applications using Python and Xively
    • custom cloud platform / Your own cloud platform for the IoT
  • IoT cloud platform, on EC2 instance
    • creating / Creating an IoT platform on the EC2 instance
    • necessary packages, installing on AWS / Installing the necessary packages on AWS
    • virtual instance security, configuring / Configuring the security of the virtual instance
    • testing / Testing your cloud platform
    • Mosquitto service, testing / Testing the Mosquitto service
    • basic security, configuring / Configuring and testing basic security
    • basic security, testing / Configuring and testing basic security
    • project, uploading on instance / Uploading and testing a project on the instance
    • project, testing on instance / Uploading and testing a project on the instance
  • IoT cloud platforms
    • Xively / The IoT cloud platforms, Xively – a cloud platform for the IoT
    • 2lemetry / The IoT cloud platforms
    • Carriots / The IoT cloud platforms, Carriots
    • ThingSpeak / The IoT cloud platforms, ThingSpeak
  • IoT projects
    • design methodology / The design methodology for IoT projects
  • IoT web applications
    • architecture / Architecture of IoT web applications
  • IP address
    • about / Networking fundamentals
    • obtaining / Obtaining the IP address of your computer
    • obtaining, for Windows / Windows
    • obtaining, for Mac OS X / Mac OS X
    • obtaining, for Linux / Linux
  • IPAddress class
    • about / The IPAddress class

L

  • Label() widget
    • about / Learning Tkinter for GUI design, The Label() widget, The Label() widget – monitoring I/O pins
    • used, for monitoring I/O pins / The Label() widget – monitoring I/O pins
  • least significant bit (LSB)
    • about / Arduino coding for the TMP102 temperature sensor
  • LED
    • brightness, controlling with PWM / LED – controlling LED brightness using PWM
    • connections / Connections
    • Python code / The Python code
  • libraries, Arduino IDE
    • about / Working with libraries
    • URL / Working with libraries
  • Line feed + Carriage Return (LF + CR)
    • about / Playing with a pySerial example
  • Linux
    • Python, installing / Linux
    • Setuptools, installing / Linux
    • Arduino IDE, installing / Linux
    • Arduino board connection, establishing / Linux
    • IP address, obtaining / Linux
  • Listbox() widget
    • about / The Checkbutton() widget – selecting LEDs
    • URL / The Checkbutton() widget – selecting LEDs
  • local area network (LAN)
    • about / Networking fundamentals
  • localhost IP address
    • about / Networking fundamentals
  • loop() function
    • about / The loop() function
    • using / The loop() function

M

  • Mac OS X
    • Python, installing / Mac OS X
    • Setuptools, installing / Mac OS X
    • Arduino IDE, installing / Mac OS X
    • Arduino board connection, establishing / Mac OS X
    • matplotlib, configuring / Configuring matplotlib on Mac OS X
    • SD card, preparing / Preparing an SD card
    • IP address, obtaining / Mac OS X
  • matplotlib
    • about / Getting started with matplotlib
    • URL / Getting started with matplotlib, Configuring matplotlib on Windows
    • configuring, on Windows / Configuring matplotlib on Windows
    • configuring, on Mac OS X / Configuring matplotlib on Mac OS X
    • upgrading / Upgrading matplotlib
    • installation errors, troubleshooting / Troubleshooting installation errors
    • reference link / Troubleshooting installation errors
    • setting up, on Ubuntu / Setting up matplotlib on Ubuntu
    • used, for plotting random numbers / Plotting random numbers using matplotlib
  • media access control (MAC) address
    • about / Networking fundamentals
  • monitoring station, remote home monitoring system
    • defining / Stage 1 – a monitoring station using Arduino, Designing the monitoring station
    • Arduino sketch / The Arduino sketch for the monitoring station
  • Mosquitto
    • about / Mosquitto – an open source MQTT broker
    • URL / Mosquitto – an open source MQTT broker
    • setting up / Setting up Mosquitto
    • initialization / Getting familiar with Mosquitto
  • most significant bit (MSB)
    • about / Arduino coding for the TMP102 temperature sensor
  • motion-triggered LEDs
    • developing / Motion-triggered LEDs – the project description
    • project goals / The project goal
    • examples / The project goal
    • online resources / The project goal
    • software flow design / The software flow design
    • hardware system design / The hardware system design
    • hardware connections, testing / Testing hardware connections
  • motion-triggered LEDs, components
    • PIR sensors / The list of components
    • LEDs / The list of components
    • wires / The list of components
    • resistors / The list of components
    • breadboard / The list of components
    • Arduino board / The list of components
    • USB cable / The list of components
    • computer / The list of components
  • motion-triggered LEDs, using Arduino sketch
    • developing / Method 1 – using a standalone Arduino sketch
    • project setup / The project setup
    • coding / The Arduino sketch
    • setup() function, using / The setup() function
    • loop() function, using / The loop() function
    • custom Arduino functions, using / Working with custom Arduino functions
    • testing / Testing
    • troubleshooting / Troubleshooting
  • motion-triggered LEDs, using Python and Firmata
    • developing / Method 2 – using Python and Firmata
    • project setup / The project setup
    • Python executable files, using / Working with Python executable files
    • coding / The Python code
    • pyFirmata methods, using / Working with pyFirmata methods
    • Python functions, using / Working with Python functions
    • testing / Testing
    • troubleshooting / Troubleshooting
  • MQTT
    • about / MQTT – A lightweight messaging protocol
    • URL / Introduction to MQTT
    • Mosquitto / Mosquitto – an open source MQTT broker
  • MQTT, on Arduino
    • PubSubClient library, using / MQTT on Arduino using the PubSubClient library
    • Arduino MQTT client, developing / Developing the Arduino MQTT client
  • MQTT, on Python
    • paho-mqtt library, using / MQTT on Python using paho-mqtt, Using the paho-mqtt Python library
  • MQTT Gateway
    • developing, for Arduino / Exercise 4 – MQTT Gateway for Arduino
    • Arduino developing, as MQTT client / Developing Arduino as the MQTT client
    • developing, Mosquitto used / Developing the MQTT Gateway using Mosquitto
    • extending, web.py used / Extending the MQTT Gateway using web.py
    • testing / Testing your Mosquitto Gateway

N

  • Nest Thermostat
    • URL / Thermostat – the project description
  • networking
    • fundamentals / Networking fundamentals
    • local area network (LAN) / Networking fundamentals
    • home area network (HAN) / Networking fundamentals
    • wide area network (WAN) / Networking fundamentals
    • protocols / Networking fundamentals
    • media access control (MAC) address / Networking fundamentals
    • Internet Protocol (IP) / Networking fundamentals
    • IP address / Networking fundamentals
    • localhost IP address / Networking fundamentals
  • networking extensions, for Arduino
    • about / Networking extensions for Arduino
    • Arduino Ethernet Shield / Arduino Ethernet Shield
    • Arduino WiFi Shield / Arduino WiFi Shield
    • Arduino Yún / Arduino Yún
  • newline character
    • about / Playing with a pySerial example
    • URL / Playing with a pySerial example
  • New Out Of Box Software (NOOBS)
    • about / Preparing an SD card
  • NumPy package
    • URL / Configuring matplotlib on Windows

O

  • open() method
    • used, for manipulating files / The open() method
    • modes / The open() method
  • operators
    • about / Python operators and built-in types, Operators

P

  • Pack geometry manager
    • about / The Pack geometry manager
  • paho-mqtt library
    • about / MQTT on Python using paho-mqtt
    • installing / Installing paho-mqtt
    • using / Using the paho-mqtt Python library
  • passive infrared (PIR) sensor
    • about / The project goal
    • using / The list of components
    • URL / The list of components
  • PEP-8
    • URL / Operators
  • physical systems / Getting started with the IoT
  • pinMode() function
    • about / The pinMode() function
  • pip
    • installing / Installing pip
  • plot() function
    • about / Plotting random numbers using matplotlib
  • portable TFT LCD display
    • using / Using a portable TFT LCD display with the Raspberry Pi
    • connecting, GPIO used / Connecting the TFT LCD using GPIO
    • configuring, with Raspberry Pi OS / Configuring the TFT LCD with the Raspberry Pi OS
    • GUI, optimizing / Optimizing the GUI for the TFT LCD screen
  • potentiometer
    • connections / Connections
    • Python code / The Python code
  • PowerSwitch Tail
    • URL / PowerSwitch Tail
  • Processing
    • about / Introduction to Arduino programming
  • protocols
    • about / Networking fundamentals
  • prototyping
    • about / Prototyping
  • prototyping, thermostat
    • about / Stage 1 – prototyping the thermostat
    • Arduino sketch / The Arduino sketch for the thermostat
    • temperature sensor, interfacing / Interfacing the temperature sensor
    • humidity sensor, interfacing / Interfacing the humidity sensor
    • light sensor, interfacing / Interfacing the light sensor
    • troubleshooting / Troubleshooting
  • prototyping, with I2C protocol
    • about / Prototyping with the I2C protocol
    • Arduino examples / Arduino examples for I2C interfacing
    • TMP102 temperature sensor, using Arduino / Arduino coding for the TMP102 temperature sensor
    • BH1750 light sensor, using Arduino / Arduino coding for the BH1750 light sensor
    • PyMata library, using / PyMata for quick I2C prototyping
    • TMP102 temperature sensor, using PyMata library / Interfacing TMP102 using PyMata
    • BH1750 light sensor, using PyMata library / Interfacing BH1750 using PyMata
    • pySerial commands, using / Useful pySerial commands
  • prototyping templates, using Firmata
    • about / Prototyping templates using Firmata
    • potentiometer / Potentiometer – continuous observation from an analog input
    • buzzer, using / Buzzer – generating sound alarm pattern
    • DC motor, using / DC motor – controlling motor speed using PWM
    • LED / LED – controlling LED brightness using PWM
    • servomotors, using / Servomotor – moving the motor to a certain angle
  • PubSubClient library
    • using / MQTT on Arduino using the PubSubClient library
    • installing / Installing the PubSubClient library
    • URL / Installing the PubSubClient library
  • pulse-width modulation (PWM)
    • about / The Arduino Uno board
  • push button switch
    • using / The list of required components
  • pyFirmata methods
    • working with / Working with pyFirmata methods
    • used, for setting up Arduino board / Setting up the Arduino board
    • used, for configuring Arduino pins / Configuring Arduino pins
    • used, for working with Arduino pins / Working with pins
    • servo_config(pin,min_pulse=544,max_pulse=2400,angle=0) / Additional functions
    • pass_time(seconds) / Additional functions
    • get_firmata_version() / Additional functions
    • exit() / Additional functions
    • pulseIn/pulseOut / Upcoming functions
    • shiftIn/shiftOut / Upcoming functions
  • PyPI
    • URL / Why we use Python, Installing Python packages
    • about / Why we use Python
  • pyplot framework
    • about / Plotting random numbers using matplotlib
    • figure() function / Plotting random numbers using matplotlib
    • show() method / Plotting random numbers using matplotlib
  • pySerial commands
    • using / Useful pySerial commands
    • used, for connecting with serial port / Connecting with the serial port
    • used, for reading a line from port / Reading a line from the port
    • used, for flushing port to avoid buffer overflow / Flushing the port to avoid buffer overflow
    • used, for closing port / Closing the port
  • pySerial library
    • about / Getting started with pySerial
    • installing / Installing pySerial
    • URL / Installing pySerial
    • example / Playing with a pySerial example
    • and Firmata, bridging / Bridging pySerial and Firmata
  • Python
    • about / Introduction to Python
    • benefits / Why we use Python
    • usage considerations / When do we use other languages
    • URL / When do we use other languages
    • installing / Installing Python and Setuptools
    • installing, on Linux / Linux
    • installing, on Ubuntu / Ubuntu
    • installing, on Fedora/Red Hat Linux / Fedora and Red Hat
    • installing, on Windows / Windows
    • URL, for downloading / Windows, Mac OS X
    • installing, on Mac OS X / Mac OS X
    • pip, installing / Installing pip
    • URL, for documentation / Controlling the flow of your program
  • Python code, Tweet-a-PowerStrip
    • about / The Python code
  • Python context manager
    • reference link / The with statement – Python context manager
  • Python data, downloading to Xively
    • about / Python – downloading data from Xively
    • basic method, for retrieving data / The basic method for retrieving data from Xively
    • data retrieving, from web.py web interface / Retrieving data from the web.py web interface
    • custom notifications, from Xively / Triggers – custom notifications from Xively
    • triggers / Triggers – custom notifications from Xively
  • Python data, uploading to Xively
    • about / Python – uploading data to Xively
    • basic method, for sending data / The basic method for sending data
    • web interface used / Uploading data using a web interface based on web.py
  • Python executable files
    • using / Working with Python executable files
  • Python functions
    • using / Working with Python functions
    • def keyword / Working with Python functions
  • Python GUI
    • Tkinter / Learning Tkinter for GUI design
    • first program / Your first Python GUI program
    • Python-Arduino project, remaking / Remaking your first Python-Arduino project with a GUI
  • Python packages
    • installing / Installing Python packages
    • installing, $ pip install *PackageName>=version* command used / Installing Python packages
  • Python programming
    • fundamentals / The fundamentals of Python programming
    • operators / Python operators and built-in types, Operators
    • built-in types / Python operators and built-in types, Built-in types
    • comments / Python operators and built-in types
    • program flow, controlling / Controlling the flow of your program
    • if statement / The if statement
    • for statement / The for statement
    • while statement / The while statement
  • Python software flow, Tweet-a-PowerStrip
    • about / Python software flow
  • Python threading library
    • URL / Using the paho-mqtt Python library
  • Python tutorials
    • URL / The fundamentals of Python programming, The while statement

R

  • Radiobutton() widget
    • about / The Checkbutton() widget – selecting LEDs
    • URL / The Checkbutton() widget – selecting LEDs
  • Raspberry Pi
    • about / What is a Raspberry Pi?
    • Raspbian / What is a Raspberry Pi?
    • versions / What is a Raspberry Pi?
    • configuring / Installing the operating system and configuring the Raspberry Pi
    • operating system, installing / Installing the operating system and configuring the Raspberry Pi
    • hardware components / What do you need to begin using the Raspberry Pi?
    • URL / What do you need to begin using the Raspberry Pi?, Preparing an SD card
    • SD card, preparing / Preparing an SD card
    • setup process / The Raspberry Pi setup process
  • read() method
    • using / The read() method
  • real-time Arduino data
    • plotting / Plotting real-time Arduino data
  • remote home monitoring system
    • project overview / Project overview
    • project goals / The project goals
    • project requirements / The project requirements
    • system architecture, designing / Designing system architecture
    • UX flow, defining / Defining UX flow
    • hardware components / The list of required components
    • development stages, defining / Defining the project development stages
    • monitoring station, Arduino used / Stage 1 – a monitoring station using Arduino
    • testing / Testing, Testing and troubleshooting
    • control center, using / Stage 2 – a control center using Python and the Raspberry Pi
    • web application / Stage 3 – a web application using Xively, Python, and Amazon cloud service
    • troubleshooting / Testing and troubleshooting
    • extending / Extending your remote home monitoring system
    • multiple monitoring stations, utilizing / Utilizing multiple monitoring stations
    • sensory capabilities, extending / Extending sensory capabilities
    • UX, improving / Improving UX
    • cloud-based features, expanding / Expanding cloud-based features
    • improved intelligence, for situation awareness / Improving intelligence for situation awareness
    • hardware enclosures, creating / Creating an enclosure for hardware components
  • Representation State Transfer (REST)
    • about / Python web framework – web.py
  • RESTful web applications
    • developing, with Arduino and Python / RESTful web applications with Arduino and Python
    • designing / Designing REST-based Arduino applications
    • GET request, implementing / Working with the GET request from Arduino
    • GET request, generating / The Arduino code to generate the GET request
    • GET request, handling with web.py / The HTTP server using web.py to handle the GET request
    • POST request, implementing / Working with the POST request from Arduino
    • POST request, generating / The Arduino code to generate the POST request
    • POST request, handling with web.py / The HTTP server using web.py to handle the POST request
    • architecture / Exercise 3 – a RESTful Arduino web application
    • Arduino sketch / The Arduino sketch for the exercise
    • web.py web application / The web.py application to support REST requests
    • resource-constrained messaging protocol, using / Why do we need a resource-constrained messaging protocol?

S

  • Scale() widget
    • about / Learning Tkinter for GUI design, The Scale() widget – adjusting the brightness of an LED
    • used, for adjusting brightness of LED / The Scale() widget – adjusting the brightness of an LED
  • SD card
    • reference link / What do you need to begin using the Raspberry Pi?, Preparing an SD card
    • preparing / Preparing an SD card
    • preparing, from Windows / Preparing an SD card
    • preparing, from Mac OS X / Preparing an SD card
    • preparing, from Ubuntu Linux / Preparing an SD card
  • Secure Shell (SSH) protocol / Logging into your virtual instance
  • Serial Clock Line (SCL)
    • about / Prototyping with the I2C protocol
  • Serial Data Line (SDA)
    • about / Prototyping with the I2C protocol
  • serial monitor
    • using / Using the Serial Monitor window
  • serial peripheral interface (SPI)
    • about / Prototyping
  • Server class
    • about / The Server class
  • servomotors
    • using / Servomotor – moving the motor to a certain angle
    • connections / Connections
    • Python code / The Python code
  • setup() function
    • using / The setup() function
  • Setuptools
    • installing / Installing Setuptools
    • about / Installing Setuptools
    • installing, on Linux / Linux
    • installing, on Windows / Windows
    • installing, on Mac OS X / Mac OS X
  • sketch
    • about / What is an Arduino sketch?
    • compiling / Compiling and uploading sketches
    • uploading / Compiling and uploading sketches
  • sketchbook
    • about / What is an Arduino sketch?
  • slicing
    • about / Lists
  • StandardFirmata firmware
    • using / Prototyping
  • statements
    • about / Functions and statements, Statements
  • subnetwork/subnet
    • about / Exercise 1 – a web server, your first Arduino network program
    • reference link / Exercise 1 – a web server, your first Arduino network program
  • system architecture, remote home monitoring system
    • designing / Designing system architecture
    • monitoring station / The monitoring station
    • control center / The control center
    • cloud services / The cloud services
  • system architecture, Tweet-a-PowerStrip
    • about / System architecture

T

  • Templetor
    • about / Templates
    • URL / Templates
  • thermostat
    • building / Thermostat – the project description
    • project description / Thermostat – the project description
    • project background / Project background
    • project stages / Project goals and stages
    • project goals / Project goals and stages
    • required components, identifying / The list of required components
    • hardware design / Hardware design
    • software flow, for user experience design / Software flow for user experience design
    • prototyping / Stage 1 – prototyping the thermostat
    • GUI, designing / Designing the GUI and plot in Python
    • plot, designing / Designing the GUI and plot in Python
    • deploying, Raspberry Pi used / Stage 2 – using a Raspberry Pi for the deployable thermostat
  • thermostat, prototyping
    • Arduino interrupts, using / Using Arduino interrupts
  • thermostat, using Raspberry Pi
    • deploying / Stage 2 – using a Raspberry Pi for the deployable thermostat
    • portable TFT LCD display, using / Using a portable TFT LCD display with the Raspberry Pi
    • TFT LCD connection, using GPIO / Connecting the TFT LCD using GPIO
    • TFT LCD, configuring / Configuring the TFT LCD with the Raspberry Pi OS
    • GUI, optimizing for TFT LCD screen / Optimizing the GUI for the TFT LCD screen
    • troubleshooting / Troubleshooting
  • thin-film transistor liquid-crystal display (TFT LCD)
    • about / Hardware design
  • ThingSpeak
    • about / ThingSpeak
  • Tk() widget
    • about / Learning Tkinter for GUI design, The root widget Tk() and the top-level methods
  • Tkinter
    • about / Learning Tkinter for GUI design
    • Pack geometry manager / The Pack geometry manager
    • Grid geometry manager / The Grid geometry manager
    • plots, integrating / Integrating plots in the Tkinter window
  • Tkinter, widgets
    • Tk() / Learning Tkinter for GUI design
    • Label() / Learning Tkinter for GUI design
    • Button() / Learning Tkinter for GUI design
    • Entry() / Learning Tkinter for GUI design
    • Scale() / Learning Tkinter for GUI design
    • Checkbox() / Learning Tkinter for GUI design
  • Tkinter class
    • about / The Label() widget – monitoring I/O pins
    • BooleanVar() method / The Label() widget – monitoring I/O pins
    • update_idletasks method / The Label() widget – monitoring I/O pins
    • update method / The Label() widget – monitoring I/O pins
  • TMP102 temperature sensor
    • interfacing, Arduino used / Arduino coding for the TMP102 temperature sensor
    • interfacing, PyMata library used / Interfacing TMP102 using PyMata
  • transistor terminals
    • reference link / Connections
  • troubleshooting
    • Tweet-a-PowerStrip / Testing and troubleshooting
  • troubleshooting, Arduino board connection
    • about / Troubleshooting
  • Tweet-a-PowerStrip
    • project overview / Project overview
    • project requirements / Project requirements
    • system architecture / System architecture
    • hardware components / Required hardware components
    • user experience flow / User experience flow
    • development stage / Development and deployment stages
    • deployment stage / Development and deployment stages
    • smart power strip with Arduino / Stage 1 – a smart power strip with Arduino and relays
    • hardware design / Hardware design
    • Arduino code / The Arduino code
    • Python code / Stage 2 – the Python code to process tweets, The Python code
    • Python software flow / Python software flow
    • Twitter application, setting up / Setting up the Twitter application
    • testing / Testing and troubleshooting
    • troubleshooting / Testing and troubleshooting
    • multiple features, adding / Extending the project with additional features
  • Twitter application, Tweet-a-PowerStrip
    • setting up / Setting up the Twitter application

U

  • Ubuntu
    • Python, installing / Ubuntu
    • matplotlib, setting up / Setting up matplotlib on Ubuntu
  • Ubuntu Linux
    • SD card, preparing / Preparing an SD card
  • Universal Serial Bus (USB)
    • about / Using the Serial Monitor window
  • Uno board
    • about / The Arduino Uno board
  • user experience (UX) flow, Tweet-a-PowerStrip
    • about / User experience flow

V

  • variables
    • about / Variables
  • virtual instance, on AWS EC2 service
    • creating / Creating a virtual instance on the AWS EC2 service
    • logging into / Logging into your virtual instance
  • void data type
    • about / Data types

W

  • web.py
    • used, for developing web applications / Python web framework – web.py
    • installing / Installing web.py
    • basic concepts / Essential web.py concepts for developing complex web applications
    • URL, handling / Handling URLs
    • GET methods / The GET and POST methods
    • POST methods / The GET and POST methods
    • templates / Templates
    • forms / Forms
    • with Arduino serial interface / Exercise 2 – playing with web.py concepts using the Arduino serial interface
  • web application, remote home monitoring system
    • about / Stage 3 – a web application using Xively, Python, and Amazon cloud service
    • architecture / Architecture of the cloud services
    • Python web application, hosted on Amazon AWS / Python web application hosted on Amazon AWS
    • testing / Testing the web application, Testing and troubleshooting
  • web applications
    • developing, with Python / Developing web applications using Python
    • developing, web.py used / Python web framework – web.py
    • implementing, web.py used / Your first Python web application
  • while statement
    • about / The while statement
  • wide area network (WAN)
    • about / Networking fundamentals
  • Windows
    • Python, installing / Windows
    • Setuptools, installing / Windows
    • Arduino IDE, installing / Windows
    • Arduino board connection, establishing / Windows
    • matplotlib, configuring / Configuring matplotlib on Windows
    • SD card, preparing / Preparing an SD card
    • IP address, obtaining / Windows
  • Wire library
    • about / Prototyping with the I2C protocol
    • URL / Prototyping with the I2C protocol
  • Wiring
    • about / Introduction to Arduino programming
  • with statement
    • using / The with statement – Python context manager
  • World Wide Web (WWW)
    • about / RESTful web applications with Arduino and Python
  • write() method
    • used, for working with files / The write() method

X

  • Xively / Architecture of the cloud services
  • Xively, IoT cloud platforms
    • about / Xively – a cloud platform for the IoT
    • account, setting up / Setting up an account on Xively
    • working with / Working with Xively
    • Adruino, interfacing with / Interfacing Arduino with Xively
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime
Visually different images