Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Sysex Command

Open Psydis opened this issue 5 years ago • 5 comments

Is there any methods as "sendSysex" to customize protocol? SendStringData doesn't work fine in my project and I'd like to manage commands from SolidSoils or I fault to use that method.

Thanks

Psydis avatar Aug 05 '20 16:08 Psydis

If you want to send your own custom sysex messages, then you'll have to write your own method to fill in your sysex message and send it to the Arduino.

Take a look at the methods SendSysExCommand, SetSamplingInterval or SendStringData https://github.com/SolidSoils/Arduino/blob/master/Solid.Arduino/ArduinoSession.cs for good examples.

Basically, fill an array with your sysex content and write it to the connection. It's not that hard.

jeroenwalter avatar Aug 05 '20 16:08 jeroenwalter

In my fork for .netcore I have made the methods SendSysEx and SendSysExWithReply that you maybe can use as inspiration. https://github.com/jeroenwalter/Arduino/blob/netcore30/Solid.Arduino.Firmata/FirmataSession.cs

jeroenwalter avatar Aug 05 '20 16:08 jeroenwalter

In my fork for .netcore I have made method SendSysEx and SendSysExWithReply that you maybe can use as inspiration. https://github.com/jeroenwalter/Arduino/blob/netcore30/Solid.Arduino.Firmata/FirmataSession.cs

That's incredible ... I just try to compile your fork some minutes ago on Core 3.1!!! I'll let you know if works!!! Thanks!

Psydis avatar Aug 05 '20 16:08 Psydis

It's already configured for netcore 3.1 :)

jeroenwalter avatar Aug 05 '20 16:08 jeroenwalter

It's already configured for netcore 3.1 :)

I know but i'm a maniac ... i love to recompile code, so i can understand it better!!!

Psydis avatar Aug 05 '20 16:08 Psydis