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:
- Open up Thonny from Application Menu | Programming | Thonny Python IDE
- Click on the New icon to create a new file
- Type the following:
from twilio.rest import Clientfrom gpiozero import RGBLEDfrom gpiozero import Buzzerfrom bluedot import BlueDotfrom signal import ...