Creating a secret doorbell application with text messaging

Now that we have the ability to send a text message whenever someone pushes the big blue button on our Android device, let's make it a bit more complicated. We will modify the SecretDoorbell class we created in Chapter 11, Creating a Doorbell Button Using Bluetooth, and give it the ability to send text messages telling us who is at the door. Like we did previously, we will put all our code into one file to keep it compact:

  1. Open up Thonny from Application Menu | Programming | Thonny Python IDE
  2. Click on the New icon to create a new file
  3. Type the following:
from twilio.rest import Clientfrom gpiozero import RGBLEDfrom gpiozero import Buzzerfrom bluedot import BlueDotfrom signal import ...

Get Internet of Things Programming Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.