B4R Question How to code "buf(0)=value >> 8" in B4R?

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear friends, please for advice,

how can I write the value of bytes from this Arduino code:

B4X:
long firstvalue = 0
long secondvalue = 500
buf(0)=secondvalue >> 8
buf(1)=firstvalue >> 16
buf(2)=firstvalue >> 24

in B4R?

Best regards
p4ppc
 

RJB

Active Member
Licensed User
Longtime User
B4X:
buf(0) = Bit.ShiftRight(secondvalue, 8) ?
buf(0) = second byte of secondvalue (from LSB)
 
Upvote 0
Top