Page 1 of 1

My functions asks for 3 arguments. But its suppose to be only 2?

Posted: Fri Oct 16, 2020 12:50 pm
by Marius
What am i missing here?
code.png
code.png (25.04 KiB) Viewed 1786 times
function.png
function.png (29.06 KiB) Viewed 1786 times

Re: My functions asks for 3 arguments. But its suppose to be only 2?

Posted: Fri Oct 16, 2020 1:19 pm
by pythoncoder
See the docs. The spi.write_readinto method takes two args, you provided only one.

Note that self counts as one arg, which is why the error message refers to 3 args. It is seeing self and ba so is getting 2 args instead of the required 3.

Re: My functions asks for 3 arguments. But its suppose to be only 2?

Posted: Fri Oct 16, 2020 1:54 pm
by Marius
pythoncoder wrote:
Fri Oct 16, 2020 1:19 pm
See the docs. The spi.write_readinto method takes two args, you provided only one.

Note that self counts as one arg, which is why the error message refers to 3 args. It is seeing self and ba so is getting 2 args instead of the required 3.
Got it! Thanks! :D