just i want to convert an integer to array of byte, to introduce it in a string but i cannot convert my integer to byte: why ? i don't undersant... if you can help me, you will be welcome!
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public Serial1 As Serial
Public bc As ByteConverter
Public timer1 As Timer
Public sosnb As Int = 0
Public sosB() As Byte
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
timer1.Initialize("timer1_tick",1000)
timer1.enabled = True
End Sub
Sub timer1_tick
sosnb = sosnb +1
sosB = bc.IntsToBytes(sosnb)
Log(sosB)
End Sub