I have a HEX file that I've chosen with file chooser and read into a list.
B4X:
Dim List1 As List
List1.Initialize
List1 = File.ReadList(File.GetFileParent(filename), File.GetName(filename))
For i = 0 To List1.Size - 1
Log(List1.Get(i))
Next
Next step is to transmit this list/hex file to a microcontroller (over an opened com port). How would I do this ?
Hints, tips, advice, gratefully received - Many thanks in advance
Hi Steve, Yes I have comms between the PC and the micro, it's getting the list into a byte array suitable from transmission (I think) I'm struggling with.
Hi Erel,
Thanks for the advice. I seem to be missing some bytes.
The code is below and the log will log b.length correctly as 36133
the loop will only log 603 values ?
Any idea what's happening here.
Many thanks in advance.
B4X:
Dim b() As Byte = Bit.InputStreamToBytes(File.OpenInput(File.GetFileParent(filename), File.GetName(filename)))
Log (b.Length)
For x =0 To b.Length
Log (x &" - " & b(x))
Next