Newbie Float question
Matthew Jones
Posts: 14
So I have tried to search this but I have no luck finding much on it.
I need to do some work on Floats then print them to the Serial Terminal (ST) to make sure everything lining up. Seems that when I work on a float I cannot print them to the ST
The following is just a small test to confirm my problem.
Con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
cpin = 0
dpin = 1
spin = 2
poNum = 2.3333377777777777
peNum = 2.7777777777777777
OBJ
adc : "MCP3208"
pst : "Parallax Serial Terminal"
fa : "Float32Full"
fp : "FloatString"
VAR
Word printMe
PUB main
pst.start (115200)
printMe:=(fp.FloatToString(fa.Fadd(poNum,peNum)))
repeat
pst.str(string("my number:"))
pst.str(printMe)
pst.newline
I am just wondering what I am missing. Or is this just not possibility?
Thanks in advance
Matthew
I need to do some work on Floats then print them to the Serial Terminal (ST) to make sure everything lining up. Seems that when I work on a float I cannot print them to the ST
The following is just a small test to confirm my problem.
Con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
cpin = 0
dpin = 1
spin = 2
poNum = 2.3333377777777777
peNum = 2.7777777777777777
OBJ
adc : "MCP3208"
pst : "Parallax Serial Terminal"
fa : "Float32Full"
fp : "FloatString"
VAR
Word printMe
PUB main
pst.start (115200)
printMe:=(fp.FloatToString(fa.Fadd(poNum,peNum)))
repeat
pst.str(string("my number:"))
pst.str(printMe)
pst.newline
I am just wondering what I am missing. Or is this just not possibility?
Thanks in advance
Matthew
Comments
So How do I find out if I need to start a library or not? Is it always in the library. Is that just a standard for everything I include>
Thanks again.
Matthew