Hi guys,
I have in the past sent a series of bytes using the char send function in the legacy SPI component, I'm now on a new project and looking to tidy the whole process up.
I though I could use the send string function to send a byte array. However the send string function does seem to want an array but the actual 'text' string.
Is there a function to convert a byte array to a text string?
As an side query, The current SPI legacy can often be made to work but has anyone heard of plans in the future for a more general purpose SPI component?
Cheers,
John
SPI Legacy - Send String and Byte Arrays
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SPI Legacy - Send String and Byte Arrays
Hi John,
You can create a string variable in the variable manager and then use this just like you would a byte array. You could then pass this directly to the send string function. The difference between a byte array and a string is negligible and its more of a Flowcode syntax problem where the component is expecting a string type variable.
We do have plans for a generic SPI component, in fact the C code for this is done and is just waiting for a front end.
You can create a string variable in the variable manager and then use this just like you would a byte array. You could then pass this directly to the send string function. The difference between a byte array and a string is negligible and its more of a Flowcode syntax problem where the component is expecting a string type variable.
We do have plans for a generic SPI component, in fact the C code for this is done and is just waiting for a front end.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Jay Dee
- Posts: 398
- Joined: Tue Aug 18, 2009 6:42 pm
- Has thanked: 121 times
- Been thanked: 154 times
- Contact:
Re: SPI Legacy - Send String and Byte Arrays
Thanks for the pointers Ben, thumbs up as usual! Look forward to SPI developments