dourong8495 2014-02-03 04:05
浏览 39

如何创建Arduino / Raspberry pi api?

I always want to create an API which lets me send value over the internet to an specific Arduino board or raspberry, I know that I can do it with a third party Server like> https://www.teleduino.org/ or https://www.yaler.net/ or if I use Raspberry I can install it Android and send data through GCM. But I don't want to use any other server, I already have a PHP hosting.

I think that I need to open a XMPP port or something to call directly the Ethernet shield or the the raspberry pi IP.

Will I need a static IP.

Any suggestions?

  • 写回答

1条回答 默认 最新

  • dor2p0520 2014-02-03 14:06
    关注

    You want to write you own PROTOCOL, it can be based or use other protocol. If you have complete access to server, my suggestion is to use TCP Socket direcly (Client class on arduino with write e read, like using the Serial), if you can't then you have to "tunnel" your PROTOCOL over an accepted protocol on the server. If it has php then the protocol il HTTP, witch is based on TCP. see http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Example_session

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度