Arduino ethernet communication

让人想犯罪 __ 提交于 2019-12-13 02:47:41

问题


Is it possible to get sensor output from Arduino via Ethernet connection and to send data to Arduino via Ethernet?

So basically can "replace" serial port with Ethernet port?


回答1:


The typical way to do this is with an Arduino Ethernet shield, a small hardware module that plugs into your Arduino board:

  • http://arduino.cc/en/Main/ArduinoEthernetShield

Updated:

One very common approach for client to server communication would be to use HTTP over TCP/IP. See this example on the Ardunio site of a simple client on an Ardunio connecting with a server (in this case google):

  • http://arduino.cc/en/Tutorial/WebClient

For your use case you can simply create your own server and modify the example to send data to it.

Alternatively you can skip the HTTP part and just use sockets - there is an open source example here:

  • https://github.com/billroy/socket.io-arduino-client


来源:https://stackoverflow.com/questions/28338618/arduino-ethernet-communication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!