Closed caderoux closed 3 years ago
My command is 1 byte long - is that the problem?
No, this is not the problem.
Please take a few moments to read the documentation for the transferSync
method. It explains how to call transferSync
. The code posted above isn't calling transferSync
correctly.
Also, take a look at the Usage section of the readme. It demonstrates how to call transfer
which is similar to transferSync
.
I'm going to go ahead and assume all is ok with spi-device here and close this issue. If it does turn out to be an issue with spi-device the ticket can be reopened.
My command is 1 byte long - is that the problem?
No, this is not the problem.
Please take a few moments to read the documentation for the
transferSync
method. It explains how to calltransferSync
. The code posted above isn't callingtransferSync
correctly.Also, take a look at the Usage section of the readme. It demonstrates how to call
transfer
which is similar totransferSync
.
Yes, I found the problem, the message parameter needs to be an array of sub-messages.
I'm trying to port the Unicorn Hat Mini library to nodejs: https://github.com/pimoroni/unicornhatmini-python/blob/master/library/unicornhatmini/__init__.py
I'm just getting started and these initializations of the LED matrix controllers are giving me issues:
Right now, I am just using synchronous code to get things working:
I'm getting this error on the very first transfer:
Uncaught Error: EINVAL, incorrect arguments passed to transferSync(message)
which appears to come from here:
My command is 1 byte long - is that the problem?