V
V
Vitaly Pukhov2014-11-25 04:47:55
Arduino
Vitaly Pukhov, 2014-11-25 04:47:55

How to pass byte[] array to Arduino from C#?

Please help to solve the issue, I have already written the solution to this issue twice, both times I killed several hours to write a working code that could work out quickly enough, but unfortunately each time I accidentally killed the source codes and now I want to return to this issue again, but kill a few hours I really don’t want to, maybe someone has come across this issue, googling gives only approximate solutions, each of which either does not work, or is terribly buggy at large volumes, or works very slowly. The task is as follows, it is necessary to transfer an array of 32x4 elements of the byte type with data integrity control, and this must be done at least 10 times per second or more often, while taking into account that the microcontroller will be busy processing the received data by sending this entire array via SPI. It does not look very realistic, because. the amount of work for the miserable arduino is large,

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eddy_Em, 2014-11-25
@Eddy_Em

And what's the trouble? If there is a transmission via UART, just write from the computer side, accept it on the fool, calculate the CRC and send it back, compare the CRC on the computer and perform certain actions.
This is at most a dozen lines of code. Well, on the "sidies", perhaps more.
By the way, it's better to do such low-level things in normal C: the higher the abstraction, the less chance that everything will work as it should. Especially in the case of "sidies", which, as it was a small-soft craft, it is not clear why it was invented, it remains so!

L
love_energy, 2014-11-25
@love_energy

Use leOS2 . This is certainly not an RTOS, but it contains a simple scheduler that can be used to parallelize the reception and processing of data.
Forgot to add. You still need double buffering.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question