duandeng1824 2015-06-05 19:59
浏览 58

基于Python的Raspberry pi与PHP Web客户端 - 更好的解决方案

I have a problem, but first, let me explain the story:

My "Weekend-Project" was to build a Remote control between my Raspberry Pi and our school's website, which is a simple system - since it was only a 2days project - what can execute python scripts on the pi (written on the site) && control the PiFace's outputs attached to my Raspberry. Like a small "automated-home" system.

I tried to make the site the least designed, since it's not important. Take a look at it: enter image description here

It's working, and my teacher who suggested the project found it very interesting, but here comes my problem:

I used Python's urllib library to open a certain url, read data from it, handle them & communicate with it. But, I don't like it, because it has to open the url every secound to be effective >> very high bandwidth usage & requests...

I need a better solution for this. Since PHP can handle sockets, shall I try communicating with those instead?

Any suggestion or idea would be nice. Thanks!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号