-
|
Hi guys, Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Thanks for the question. The suggestion is an excellent one but, unfortunately, would not work with the design of Telemetrix4Arduino. Even though the sketch appears to work asynchronously, that is, reporting events as they seem to happen, it is implemented synchronously by polling for data changes. Supporting the SPI interface as an SPI peripheral would require enabling interrupts. An interrupt can occur at anytime and may interfere with other active interfaces by blocking at a critical moment. For example, the HC-SR04 needs to time its pulses accurately. Receiving an interrupt could disrupt its timing cycle. Again, thanks for the suggestion, but it is not practical for me to implement. |
Beta Was this translation helpful? Give feedback.
Thanks for the question. The suggestion is an excellent one but, unfortunately, would not work with the design of Telemetrix4Arduino. Even though the sketch appears to work asynchronously, that is, reporting events as they seem to happen, it is implemented synchronously by polling for data changes.
Supporting the SPI interface as an SPI peripheral would require enabling interrupts. An interrupt can occur at anytime and may interfere with other active interfaces by blocking at a critical moment. For example, the HC-SR04 needs to time its pulses accurately. Receiving an interrupt could disrupt its timing cycle.
Again, thanks for the suggestion, but it is not practical for me to implement.