简体   繁体   English

使用Twilio服务在Arduino Yun上接收短信

[英]Receiving an SMS on an Arduino Yun with the Twilio service

I'm trying to create a project with an Arduino Yun that will allow it to receive text messages and process commands based on the text. 我正在尝试使用Arduino Yun创建一个项目,该项目将允许它接收文本消息并基于文本处理命令。 I've followed the tutorial for sending SMS messages with the Yun ( https://www.twilio.com/blog/2015/02/send-sms-and-mms-from-your-arduino-yun.html ) but I can't find any resources for receiving a text. 我已按照教程通过Yun( https://www.twilio.com/blog/2015/02/send-sms-and-mms-from-your-arduino-yun.html )发送短信,但是我找不到用于接收文本的任何资源。 Could anyone help me out? 有人可以帮我吗?

In general , you can always receive an SMS on a SMS capable Twilio number you buy from the console . 通常,您始终可以在从控制台购买的具有SMS功能的Twilio号码上接收SMS。 What should be done on the receipt of that SMS is usually required to be programmed. 通常要求对收到SMS时应执行的操作进行编程。

In your case , twilio_phone_number used to send SMS out could receive the replies. 在您的情况下,用于发送SMS的twilio_phone_number可能会收到答复。

For programming the replies , (A)first setup a webserver and create an endpoint that could parse the incoming message and then trigger necessary action on your Arduino .A quick google search shows this useful link ( http://www.instructables.com/id/Controlling-Arduino-with-python-based-web-API-No-p/?ALLSTEPS ) . 为了对回复进行编程,(A)首先设置一个Web服务器并创建一个可以解析传入消息的端点,然后在Arduino上触发必要的操作。快速的Google搜索显示了此有用的链接( http://www.instructables.com/ id / Control-Arduino-with-python-based-web-API-No-p /?ALLSTEPS )。 Test this endpoint to be sure it does what you want it to do when given right params. 测试此端点,以确保在给定正确的参数时它可以执行您想要的操作。

(B) You should then setup the webhook for this number for incoming messages ( see attached When A MESSAGE COMES IN ) to the endpoint created in step 1 . (B)然后,您应该为传入消息的此号码设置Webhook(请参见在“消息进入时”附带的内容)到在步骤1中创建的端点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM