You seem unwilling to share actual details, which makes it difficult to help.
Is the “Arduino program” written in C++?
If so, then sharing it would be a good start.
Any documentation available on this?
An alternative solution might be to do something like this…
Pete.