spi_read_blocking and spi_write_blocking and how to use it right #58
-
Hello, I used telemetrix python API with an Read-only sensor and it worked flawlessly. Now I'm trying to read a more complex chip and I'm not sure if I can realise it with telemetrix. So I need more input to understand it better and estimate needed effort. I have a simple sketch/library to read a register from an device over SPI. It works perfectly in Arduino IDE. I'm trying to "rewrite" this very simple sketch to read/write a single register for ADS1256 to understand how telemetrix spi_write_blocking and spi_read_blocking works. So like I said the arduino sketch/library is very simple but it works fine:
It's not really important, I'm more interested in the implementation of the exact same function with telemetrix, but maybe its better for understanding what the sketch function does: I tried to "translate"/implement the function with telemetrix, but not successful.
Does my python/telemetrix script makes any sense (output that I get makes none)? Is it the way it should work or am I completely wrong? If we ignore the specific chip (ADS1256) and look only on our sketch function (readRegister for example), how would the telemetrix code for exact the same function look like? Is it even possible to implement the functions from sketch with telemetrix or am I wasting my time? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@kamikaravioli Some changes will be coming to SPI support soon to be compatible with the latest versions of the Arduino SPI library and to allow one to specify the chip select pin when doing spi reads and writes. Please let me know if you still want me to address your question. Again, I'm sorry for not getting back to you sooner. |
Beta Was this translation helpful? Give feedback.
@kamikaravioli
I genuinely apologize for getting back to you so late. The notification for this post was placed in my junk mailbox for some reason, and I just noticed it.
Some changes will be coming to SPI support soon to be compatible with the latest versions of the Arduino SPI library and to allow one to specify the chip select pin when doing spi reads and writes.
Please let me know if you still want me to address your question.
Again, I'm sorry for not getting back to you sooner.