Shop OBEX P1 Docs P2 Docs Learn Events
18b20 help using varables in the eightbyte code — Parallax Forums

18b20 help using varables in the eightbyte code

zapmasterzapmaster Posts: 54
edited 2009-10-16 23:37 in BASIC Stamp
I'm using varables to take the place of the eightbyte code and i'm haveing no luck.
this is part of my code:

READ 1,a
READ 2,b
READ 3,c
READ 4,d
READ 5,e
READ 6,f
READ 7,g
READ 8,h
COMMA:
DEBUG HEX2 a,HEX2 b,HEX2 c,HEX2 d,HEX2 e,HEX2 f,HEX2 g,HEX2 h
'sensor 1
· OWOUT 0,1,[noparse][[/noparse]$CC, $44]
· DO : OWIN 0,4,[noparse][[/noparse]degC] : LOOP UNTIL degC· ' wait for done
· PAUSE 100
········ OWOUT 0, 1, [noparse][[/noparse]matchrom]
· OWOUT 0,0,[noparse][[/noparse]HEX2 a,HEX2 b,HEX2 c,HEX2 d,HEX2 e,HEX2 f,HEX2 g,HEX2 h, $BE]·· 'does not work
' OWOUT 0,0,[noparse][[/noparse]$28·· ,$4f·· ,$79·· ,$2e·· ,$02·· ,$00·· ,$00·· ,$fb·· , $BE]·················'does work
·· OWIN 0,2,[noparse][[/noparse]degC.BYTE0, degC.BYTE1]
· degC = -signC ^ (ABS degC */ 160) + signC·· ' convert to degC*10, good for -degC too.
· degF = degC + 1000 * 9 / 5 - 1800 + 320 ' convert to degF*10 using offset trick <
·temp= ABS degF/10
DEBUG CR,"!POBJ COLLECT=", DEC TEMP,CR
PAUSE 100
GOTO comma
· END

the debug window with the does not work

!POBJ COLLECT=32
284F792E200FB
!POBJ COLLECT=32
284F792E200FB

the debug window with the does work

284F792E020000FB
!POBJ COLLECT=71
284F792E020000FB
!POBJ COLLECT=71

I know it must be a easy fix i just do not see it.

thanks for your help!!
·

Comments

  • zapmasterzapmaster Posts: 54
    edited 2009-10-16 23:37
    hey i fixed it

    OWOUT 0,0,[noparse][[/noparse]a,b,c,d,e,f,g,h, $BE]'does work
    what do you know i did not need the hex this is what i started with but it did not work i think
Sign In or Register to comment.