Skip to content

Part 4. If Only. Text Alerts

Elizabeth Adams edited this page Nov 27, 2018 · 3 revisions

This trash sensor would be even better if it could text you/whoever is supposed to take out the trash when it's too full. I actually spent a good amount of time trying to get the Yun to do this using Twilio. The Yun seemed to have problems whenever I tried to add another cURL command. I was finally able to get the Yun to send to Twilio by removing the streaming statements and running cURL as a shell command.

You can see the working sketch here: https://github.com/InitialState/arduinotrashsensor/blob/master/yuntrashsensor_sms.ino

A Twilio account is easy to setup. Just make sure that you verify the phone number you want to send texts to and create a Twilio phone number. You can find your Account SID and auth token on the Account Settings page.

If anybody knows why I can't get data posting and texting to work together, please let me know! I'd love to figure it out - I'm sure it's something obvious 😜.

<< Part 4: Your Personal Dashboard - Part 4: Put it in a Box >>