pin1 sends out a "2"

pin2 sends out a "4"

pin6 sends out a "64"

pin7 sends out a "128" on the serial line?

Is there a way to do it so that when pin2 goes high it sends out a 3 , then pin6 sends a 4 and pin7 going high sends out a 5?

Do: if pin0= 1 then SEROUT 2,N2400,(1)

else SEROUT 2,N2400,(0) endif

if pin1= 1 then serout 2,n2400, (2)

else serout 2,n2400, (0) endif

if pin2= 1 then serout 2,n2400, (3)

else serout 2,n2400, (0) endif

if pin6= 1 then serout 2,n2400, (4)

else serout 2,n2400, (0) endif

if pin7= 1 then serout 2,n2400, (5)

else serout 2,n2400, (0) endif

Loop

----------OR--------------------------

#Picaxe 18x

do

b0=pins & %00010010

if b0<>b1 then

serout 2,n2400,(b0)

b1=b0

end if

loop