marcos.placona
Senior Member
Hi, this is just a followup to my previous thread on serin.
I was indeed missing the N in front of the 2400
I'm now stuck on something else, and was hoping someone here could be able to help.
I have this program that expects a number coming from the serial port. As far as I understood, I can send a number like 123 via serial, but it will be read in different bits i.e.
SerIn 1,N2400,("data"),b0,b1,b2
where b0 = 1, b1 = 2, b2 = 3. I was wondering if there's any way to get this number to be a whole number again once it's received by the picaxe.
I thought about something on the lines of
number = b0 * 100
number = number + b1 * 10
number = number + b2
Obviously this didn't work , but I reckon the logic is not too far away from right.
Also, I noticed that when I pass "data123" via terminal link and try to serout the variables like:
serout 0, N2400, (b0,b1,b2,CR,LF)
I get something like "'23" or "+23" almost as if it was replacing b0 with a funny character.
Trying using b3,b4,b5 brings up the same results, as it will always skip t least one variable.
Could anyone give me a light here?
Thanks in advance
I was indeed missing the N in front of the 2400
I'm now stuck on something else, and was hoping someone here could be able to help.
I have this program that expects a number coming from the serial port. As far as I understood, I can send a number like 123 via serial, but it will be read in different bits i.e.
SerIn 1,N2400,("data"),b0,b1,b2
where b0 = 1, b1 = 2, b2 = 3. I was wondering if there's any way to get this number to be a whole number again once it's received by the picaxe.
I thought about something on the lines of
number = b0 * 100
number = number + b1 * 10
number = number + b2
Obviously this didn't work , but I reckon the logic is not too far away from right.
Also, I noticed that when I pass "data123" via terminal link and try to serout the variables like:
serout 0, N2400, (b0,b1,b2,CR,LF)
I get something like "'23" or "+23" almost as if it was replacing b0 with a funny character.
Trying using b3,b4,b5 brings up the same results, as it will always skip t least one variable.
Could anyone give me a light here?
Thanks in advance