MicroPython ESP32 CanBus
早上好,我一直想在基于 ESP32 的板上使用 machine
库中的 CAN
模块,不幸的是,正如我所想的那样,当我遇到错误时尝试导入它
>>> from machine import CAN
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'CAN'
有什么方法可以在 ESP32 板上启用 CAN
模块吗?我正在关注这个示例,它是这样写的:
[...] ESP32 内置 CAN 控制器,但需要外部添加收发器。 [...]
它指出应该可以在 ESP32 板上使用该模块。
Good morning, I've been wanting to use the CAN
module from the machine
library on an ESP32 based board, unfortunatelly, as I thought, I'm getting an error when trying to import it
>>> from machine import CAN
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'CAN'
Is there any way to enable the CAN
module on an ESP32 board? I'm following this example and it's written:
[...] The ESP32 has a built-in CAN controller, but the transceiver needs to be added externally. [...]
It states that it should be possible to use the module on an ESP32 board.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据通用的Micropython文档,它似乎具有仅在Pyboard上。
您参考的文档特定于PYCOM板的Micropython固件。
因此,董事会是否支持罐头总线将取决于其随附的硬件和固件。
According to the generic micropython documentation, it seems to have CAN only on the pyboard.
The documentation you reference is specific to the micropython firmware for pycom boards.
So whether a board does or does not support the CAN bus will depend on the hardware and firmware it comes with.