A AndroidMadhu Active Member Licensed User Jun 9, 2019 #1 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: Copy 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: Code: Copy 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: Code: Copy 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
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: Copy 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: Code: Copy 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: Code: Copy 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
A AndroidMadhu Active Member Licensed User Jun 21, 2019 #21 Also what I found is the below code at ESP8266 side, where I am getting Out of Bound error Code: Copy Private BE(200) As Object ser.ConvertBytesToArray(buffer,BE) GlobalStore.Put(0,BE(0)) 'humid. GlobalStore.Put(1,BE(1)) 'Temperature Log("Humid :",GlobalStore.Slot0) Log("Temparature :",GlobalStore.Slot1) Even If I simply send data from Arduino without B4RSerializer, the above code is throwing error. Please suggest... Upvote 0
Also what I found is the below code at ESP8266 side, where I am getting Out of Bound error Code: Copy Private BE(200) As Object ser.ConvertBytesToArray(buffer,BE) GlobalStore.Put(0,BE(0)) 'humid. GlobalStore.Put(1,BE(1)) 'Temperature Log("Humid :",GlobalStore.Slot0) Log("Temparature :",GlobalStore.Slot1) Even If I simply send data from Arduino without B4RSerializer, the above code is throwing error. Please suggest...
tigrot Well-Known Member Licensed User Longtime User Jun 21, 2019 #22 Probably you need to encrease Code: Copy #StackBufferSize: 300 to something larger like: Code: Copy #StackBufferSize: 2000 Upvote 0
Probably you need to encrease Code: Copy #StackBufferSize: 300 to something larger like: Code: Copy #StackBufferSize: 2000
A AndroidMadhu Active Member Licensed User Jun 23, 2019 #23 #StackBufferSize: 2000 Click to expand... I have increased this to 2000 at ESP8266. Below I am getting error: Code: Copy Panic C:\Users\USER\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\core_esp8266_main.cpp:103 __yield ESP8266 restarting After 2 -3 minutes.... Upvote 0
#StackBufferSize: 2000 Click to expand... I have increased this to 2000 at ESP8266. Below I am getting error: Code: Copy Panic C:\Users\USER\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\core_esp8266_main.cpp:103 __yield ESP8266 restarting After 2 -3 minutes....