Convertin from decimal to Characters

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Convertin from decimal to Characters

Post by jollybv »

Hi Guys

I am saving a string in I2C memory eg Hello World now when I read it back I get the decimal number for it 72(H) 101(e) 108(l) 108(l) 111(0) 32(space) 87(W) 111(o) 114(r) 108(l) 100(d) how do I convert that back into a string of characters? If anyone knows of an exsample it would be much appreciated.

I have tried looking at the example Ben did (NumberConversion) but I can't figure out what it does as I can't step through it
NumberConversions.fcfx
(14.72 KiB) Downloaded 201 times
Last edited by jollybv on Thu Sep 12, 2019 4:05 pm, edited 1 time in total.

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Convertin from decimal to Characters

Post by mnf »

When you print out the read back characters you are 'printing' or displaying them as numbers (they are the ASCII representation of the desired string). Post your code and we'll be able to change if needed...

Martin

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Convertin from decimal to Characters

Post by jollybv »

Hi

Thanks for the reply what in trying to do is read back the memory and then change it to Characters so I can use it in an SMS message string. If I read back each byte then convert to string it will send a string of numbers, not letters. I have made an example of what I'm trying to do
Decimal To Ascii.fcfx
(12.99 KiB) Downloaded 190 times

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Convertin from decimal to Characters

Post by mnf »

Try:
Decimal To Ascii.fcfx
(12.48 KiB) Downloaded 241 times

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Convertin from decimal to Characters

Post by jollybv »

Hi

Thanks for that works perfectly, took a whole day of trying and still could not see how simple it was thanks again. :D

Post Reply