gpt4 book ai didi

python - Mindstorms EV3 如何通过蓝牙与我的 PC 通信?

转载 作者:行者123 更新时间:2023-12-05 01:10:55 25 4
gpt4 key购买 nike

我正在用 microPython 2 对 EV3 进行编程。我在笔记本电脑上运行了另一个 python 3 程序,该程序应该以无线方式向 EV3 发送数据。可以通过蓝牙吗?如果不可能,我应该怎么做?

最佳答案

我不知道这个问题的答案,我也没有 EV3 积木来尝试这个。由于您还没有说您尝试过什么,我想我会分享一些尝试尝试的想法。

我查看了有关蓝牙的 ev3-micropython 文档,搜索结果如下: https://pybricks.github.io/ev3-micropython/messaging.html

这看起来蓝牙通信可能基于蓝牙串行端口配置文件 (SPP),因此可能值得看看 SPP 客户端是否可以通信。

第一个实验可能是启动 BluetoothMailboxServer在 EV3 上,看看您是否能够从您的 PC 与它配对? (顺便问一下,您的笔记本电脑上运行的是什么操作系统?)。

如果您使用的是 Windows,请在此 URL 帮助中执行以下说明: https://www.instructables.com/id/Raspberry-Pi-Bluetooth-to-PuTTY-on-Windows-10/

On your Windows 10 Desktop/ Laptop first enable the Bluetoothtransceiver. Select Start, Settings, then Devices. At this pointresist the intuitive temptation to Add bluetooth or other device.Instead, scroll down to 'Related settings', and select Devices andprinters. Find your Desktop/ Laptop under 'Devices', right click it,then select Bluetooth settings from the pop up menu. This brings upthe 'Bluetooth settings dialogue:

Select the COM ports tab, then select Add... to bring up the 'Add COMport' dialogue. Here we select the 'Outgoing' radio button, and thenclick on Browse... This will yield the 'Select Bluetooth Device'dialogue. All going well, you should see your Raspberry Pi listed as adiscovered device. Select the Raspberry Pi device listed, and click OKtwice. This should take you back to the COM ports tabbed dialogue, andlist a COM port that is now associated with the Windows 10/ RaspberryPi pairing. Take note of which COM port has been assigned.

在 Linux 笔记本电脑上,以这种方式创建客户端是否有效: http://blog.kevindoran.co/bluetooth-programming-with-python-3/

Linux 上的另一种选择是通过这种方式创建客户端: https://bluedot.readthedocs.io/en/latest/btcommapi.html#bluetoothclient

如果您有 Android 手机,您可以尝试通过手机与 EV3 服务配对,然后尝试连接此 SPP 应用: https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal

另一种选择是蓝牙邮箱服务器可能正在使用蓝牙低功耗 (BLE)。如果是这种情况,那么如果您的笔记本电脑上有最新版本的 Chrome 浏览器,您可以找到更多信息。转到 URL chrome://bluetooth-internals/#devices 并执行 start scan。 EV3 设备出现了吗?

关于python - Mindstorms EV3 如何通过蓝牙与我的 PC 通信?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63658480/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com