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
Explore 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
Mastering IOT

You're reading from   Mastering IOT Build modern IoT solutions that secure and monitor your IoT infrastructure

Arrow left icon
Product type Course
Published in Apr 2019
Publisher Packt
ISBN-13 9781838645434
Length 782 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Colin Dow Colin Dow
Author Profile Icon Colin Dow
Colin Dow
Perry Lea Perry Lea
Author Profile Icon Perry Lea
Perry Lea
Arrow right icon
View More author details
Toc

Table of Contents (34) Chapters Close

Title Page
Copyright
About Packt
Contributors
Preface
1. The IoT Story FREE CHAPTER 2. IoT Architecture and Core IoT Modules 3. Sensors, Endpoints, and Power Systems 4. Communications and Information Theory 5. Non-IP Based WPAN 6. IP-Based WPAN and WLAN 7. Long-Range Communication Systems and Protocols (WAN) 8. Routers and Gateways 9. IoT Security 10. Installing Raspbian on the Raspberry Pi 11. Writing Python Programs Using Raspberry Pi 12. Using the GPIO to Connect to the Outside World 13. Subscribing to Web Services 14. Controlling a Servo with Python 15. Working with the Servo Control Code to Control an Analog Device 16. Setting Up a Raspberry Pi Web Server 17. Reading Raspberry Pi GPIO Sensor Data Using Python 18. Building a Home Security Dashboard 19. Publishing to Web Services 20. Creating a Doorbell Button Using Bluetooth 21. Enhancing Our IoT Doorbell 22. Introducing the Raspberry Pi Robot Car 23. Controlling the Robot Car Using Python 24. Connecting Sensory Inputs from the Robot Car to the Web 25. Controlling the Robot Car with Web Service Calls 26. Building the JavaScript Client 27. Putting It All Together 1. Other Books You May Enjoy Index

Chapter 11. Writing Python Programs Using Raspberry Pi

In this chapter, we will start writing python programs with Raspberry Pi. Python is the official programming language for Raspberry Pi and is represented by the Pi in the name. 

The following topics will be covered in this chapter:

  • Python tools for Raspberry Pi
  • Using the Python command line
  • Writing a simple Python program

Python comes pre-installed on Raspbian in two versions, versions 2.7.14 and 3.6.5 (as of this writing) representing Python 2 and Python 3, respectively. The differences between the two versions are beyond the scope of this book. We will use Python 3 in this book unless otherwise stated.

lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering IOT
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 R$50/month. Cancel anytime
Modal Close icon
Modal Close icon