简体   繁体   English

通过UDP在Arduino和iOS设备之间发送和接收字符串

[英]Send And Receive string between Arduino and iOS Device via UDP

I need to send and receive data between Arduino and iOS Device via UDP. 我需要通过UDP在Arduino和iOS设备之间发送和接收数据。 Can I use example from official Arduino site: http://arduino.cc/en/Tutorial/UDPSendReceiveString . 我可以使用官方Arduino网站上的示例: http//arduino.cc/en/Tutorial/UDPSendReceiveString If yes, how can send strings from iOS device. 如果是,如何从iOS设备发送字符串。 Help me please. 请帮帮我。

Can I use example from official Arduino site . 我可以使用官方Arduino网站上的示例吗?

Yes

If yes, how can send strings from iOS device. 如果是,如何从iOS设备发送字符串。

Well, first you need to use an Arduino Ethernet Shield, or an Arduino Ethernet. 好吧,首先你需要使用Arduino Ethernet Shield或Arduino以太网。

Then, you need to have your iOS device on the same network as your Arduino (or at least to have the iOS and Arduino IP address accessible from each other, however you manage to do it). 然后,您需要将您的iOS设备与Arduino放在同一网络上(或至少让iOS和Arduino IP地址可以互相访问,但是您可以这样做)。

Finally, just read thoroughly the tutorial you linked, try the example, adapt the addresses from the example with your use case. 最后,只需仔细阅读您链接的教程,尝试示例,使用您的用例调整示例中的地址。

My advice to you is to first use a computer to test the UDP connection with the Arduino, and then use that computer to test the UDP connection with the iOS device, and once you know both works independently, make the connection work with both devices. 我的建议是首先使用计算机测试与Arduino的UDP连接,然后使用该计算机测试与iOS设备的UDP连接,一旦你知道两者都独立工作,就可以使连接与两个设备一起工作。

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

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