【发布时间】:2015-11-06 12:37:18
【问题描述】:
我正在用 python 编写树莓派。我想通过互联网控制我的 pi,因为我需要将数据从我的 android 应用程序发送到我的 Pi 上正在运行的 python 脚本。例如,如果我单击我的 android 应用程序上的按钮 B,树莓派的 python 脚本应该通过 Internet 以字符串或整数的形式获取数据“12345”。我将比较接收到的数据并在 python 中采取所需的操作。同样,反之亦然。如果我单击 tkinter 创建的 python 中的一个按钮,python 应该通过 Internet 将一些数据说“67890”作为字符串或整数发送到我的 android 应用程序。我将比较我的 android 应用程序接收到的数据并采取必要的措施。在 java 中创建的 android 应用程序和 Pi 上的 python 脚本之间发送和接收数据的持续过程应该继续。我已经创建了没有这个通信部分的 python 程序和 android 应用程序。怎么可能进行数据发送??
【问题讨论】:
标签: java android python python-2.7 raspberry-pi