Hello,
I am sending the data from Arduino to Esp8266.
I am able to send data from Arduino to ESP successfully as per the suggestion from @Erel, which is saved my time & Life
But after 1 minute of running I am facing error as "Out of bounds error. Array length = 2, Index = 65535"
Here is the error
Code at Arduino Side:
Code at ESP Side:
I am sending the data from Arduino to Esp8266.
I am able to send data from Arduino to ESP successfully as per the suggestion from @Erel, which is saved my time & Life
But after 1 minute of running I am facing error as "Out of bounds error. Array length = 2, Index = 65535"
Here is the error
B4X:
Wifi Connected Successfully!!!
Humid from Ardiono :33.39
Temp from Arduino :77.99
Humid from Ardiono :33.39
Temp from Arduino :77.99
Humid from Ardiono :33.39
Temp from Arduino :77.99
Humid from Ardiono :33.39
Temp from Arduino :77.99
Humid from Ardiono :33.39
Temp from Arduino :77.99
Humid from Ardiono :33.39
Temp from Arduino :77.99
Out of bounds error. Array length = 2, Index = 65535
Code at Arduino Side:
B4X:
Public Serial1 As Serial
Public softserial As SoftwareSerial
Public Timer1 As Timer
Public Astrem As AsyncStreams
Public bc As ByteConverter
'Private humid(),temp() As Byte
Private ser As B4RSerializator
Private Sub Timer1_Tick
Dim humid(),temp() As Byte
humid="33.39"
temp="77.99"
Astrem.Write(ser.ConvertArrayToBytes(Array(humid,temp)))
Log("Send to Esp8266 Successfully!!")
End Sub
Code at ESP Side:
B4X:
Public Serial1 As Serial
Public softser As SoftwareSerial
Public bc As ByteConverter
Public wifi As ESP8266WiFi
'Private timer1 As Timer
Public Astream As AsyncStreams
Private ser As B4RSerializator
Private BE(2) As Object
Private Sub Arduino_Received_Data(buffer() As Byte)
ser.ConvertBytesToArray(buffer,BE)
Log("Humid from Ardiono :",BE(0))
Log("Temp from Arduino :",BE(1))
End Sub