问题描述
我有一段简单的代码,可以通过 SPI 接口接收输入数据。它运行良好,没有明显的丢包现象。迷人的。现在,我的程序需要一个已经设置了用户帐户和权限的数据库。当我添加到服务器的连接时,python 吐出错误 theMesh.begin() RuntimeError: can't send spi message
from RF24 import *
from RF24Network import *
from RF24Mesh import *
myRadio = RF24(17,0)
theNetwork = RF24Network(myRadio)
theMesh = RF24Mesh(myRadio,theNetwork)
theMesh.setNodeID(0)
theMesh.begin()
myRadio.setPALevel(RF24_PA_MAX) # Power Amplifier
myRadio.printDetails()
while True:
theMesh.update()
theMesh.DHCP()
while theNetwork.available():
header,myData = theNetwork.read(9)
if chr(header.type) == 'M':
print (*myData)
当我添加这个时(如前所述)收到错误 theMesh.begin() RuntimeError: can't send spi message
import MysqL.connector
sqlConnection = MysqL.connector.connect(
host="localhost",user="myUserName",passwd="myPassword"
)
sqlConnection.close()
详情 操作系统:Raspbian GNU/Linux 10 (buster) 蟒蛇版本:3.7.3 MysqL.connector-python 版本:8.0.22 mariadb 版本:10.3.27-MariaDB-0+deb10u1 Raspbian 10
我似乎找不到任何地方 MysqL 与任何地方的 SPI 接口有任何冲突。我什至不知道从哪里开始。数据库代码本身工作。 SPI 通信本身工作。他们一起失败。任何人的任何想法?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)