Hi All,
I am trying to send 4 pieces of hex data as bytes of data out on a serial port.
I am unsure if the following block of code is correct?
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
When I try to use the following block copied from the forum I get an error:
"Cannot cast type: {Type=Byte,Rank=1,RemoteObject=True} to: {Type=Object,Rank=1, RemoteObject=True}"
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Can some point me in the right direction.
Thanks
			
			I am trying to send 4 pieces of hex data as bytes of data out on a serial port.
I am unsure if the following block of code is correct?
			
				B4X:
			
		
		
		astream.write(ser.ConvertArrayToBytes(Array(0x55,0x1A,0x00,0x91)))When I try to use the following block copied from the forum I get an error:
"Cannot cast type: {Type=Byte,Rank=1,RemoteObject=True} to: {Type=Object,Rank=1, RemoteObject=True}"
			
				B4X:
			
		
		
		astream.Write(ser.ConvertArrayToBytes(bc.HexToBytes("551A0091")))Can some point me in the right direction.
Thanks
 
				 
 
		 
 
		 
 
		