- Click Once: Send a message from Mom.
- Click Twice: Send a message from Dad.
- Long Click: Send a message from a Sibling
Download the AWS IoT Button Application from the App Store.
Open the application and select "Set up AWS IoT Button." It will ask you to log on to your AWS account.
Follow the instructions on the application for registering, configuring, and setting your button action.
When setting button action, select "Send SMS (nodejs)." Enter the phone number you want to send messages to, and then hit "Set action."
This will set up your button to send SMS messages in your AWS Account.Step 2: Modifying your Lambda function
Log on to your AWS Console, and make sure you are in the same region that you registered your button. Open up Lambda, and you should find a newly created lambda function named "iotbutton_" followed by your buttons DSN.
Open the function, and copy in paste the code shown below. Make sure to replace the constant "PHONE_NUMBER" with the phone number that you want to send messages to.
Now, modify "momMessages", "dadMessages", and "siblingMessages" with the a list of possible messages you want to send. Make sure to keep the same format.
Save your changes.Step 3: Send your messages
Click your IoT button and send your messages!
- Click Once: A message from Mom.
- Click Twice: A message from Dad.
- Long Click (longer than 1.5 seconds): A message from a sibling!