SPI Legacy - Send String and Byte Arrays

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

SPI Legacy - Send String and Byte Arrays

Post by Jay Dee »

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

User avatar
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

Post by Benj »

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.

User avatar
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

Post by Jay Dee »

Thanks for the pointers Ben, thumbs up as usual! Look forward to SPI developments :-)

Post Reply