quest: convert Bin String to Hex

Blitz3D Forums/Blitz3D Programming/quest: convert Bin String to Hex

Lane(Posted 2006) [#1]
quest: convert Bin String to Hex
I have serial relay controller with 8 relays. building a set command is noted as 01010101 where all the odd relays are off and even relays are on.
This string " 01010101" (in blitz) needs to be converted to Hex for transport over the serial port.

Any one have a fast function for the conversion?


degac(Posted 2006) [#2]
http://www.blitzbasic.com/codearcs/codearcs.php?code=245

bin to INT then INT to HEX$()


Lane(Posted 2006) [#3]
Okay thanks, I missed that one in the archive.