Closed MARIOBASZ closed 1 year ago
Which driver?
I am using Arduino Due.
Ok, then the easiest is perhaps enabling MPG_MODE and parsing the data coming from the MPG port. If you are connecting via the programming port another option is to listen in on the TX pin. Both these methods requires a sender requesting a status report at regular intervals or a plugin triggering it when no sender is connected.
If you want your own format and automatic pushing of position data you can write a plugin that opens an UART stream and outputs the data you need. You can use the tick timer (1ms interval) in combination with subscribing to the on_execute_realtime
event. An example of how to produce a regular event is in this plugin.
I do not have any straigth example code for how to open an UART - the closest ones are the Bluetooth or ModBus plugins.
Is it okay to listen to Tx while connected to the computer? If it doesn't cause any inconvenience, I would start by trying that way.
Is it okay to listen to Tx while connected to the computer?
Yes, I have done so with other boards.
Thanks. I'll try that way.
I would like to be able to send current position data to a second microprocessor, (I don't know whether to receive information). Is it easy to do?