HUSKYLENSGeneral

help with HuskyLens !!

userHead Account cancelled 2020-10-17 14:59:57 2628 Views2 Replies
Hi everyone,
I am a little new in this module, and i need a bit help.
I am working in Jeston Nano, and i enabled my I2C port, and installed some libraries of python to work with the module.
Among the libraries is smbus. However i am having a problem when i run the function "algorthim( algorithmName)".

those errors are in processReturn huskylib's function, this problem is too when i run the test program https://wiki.dfrobot.com/HUSKYLENS_V1.0 ... 05_SEN0336 .

this is my code:

from huskylib import HuskyLensLibrary

hl = HuskyLensLibrary('I2C', '', address = 0x32)
print(hl.knock())
print(hl.count())
hl.algorthim('ALGORITHM_OBJECT_RECOGNITION')
blocks = hl.blocks()

and these guys are my errors:

Traceback (most recent call last): File "/home/ram20a/Documents/HuskyLens/huskylib.py", line 179, in processReturnData
commandSplit[4][2:4]+commandSplit[4][0:2], 16)TypeError: int() can't convert non-string with explicit base

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Program1.py", line 6, in <module>
hl.algorthim('ALGORITHM_OBJECT_RECOGNITION')
File "/home/ram20a/Documents/HuskyLens/huskylib.py", line 387, in algorthim
return self.processReturnData()
File "/home/ram20a/Documents/HuskyLens/huskylib.py", line 217, in processReturnData
self.huskylensSer.timeout=5
AttributeError: 'SMBus' object has no attribute 'timeout'
2020-11-09 19:03:55 Maybe the SCL clock below 100K is useful. You can try it.
Anyway, is it possible to use the uart communication?
userHeadPic Youyou
2020-10-26 14:05:21 Hi, I think the timeout member can only be used when using Serial protocol. Or you try to put the member's physical examination into SMBus brackets. userHeadPic nhyhello