Hi Guys,
Loving the new release, I’m having so much fun but wonder if you could help me with something…
I’m successfully sending through some data to an “HTTP in” block and then handling that in an Input port server response , before writing that to UART - which all seems to work fine.
BUT… I’m finding that if I go above about 10k in terms of the incoming data size, I’m getting a “imp crashed, reason: out of memory” error.
Is there a limit to how much data I can send through in one POST and therefore could you show me the best way to “chunk” the data - or am I doing something stupid code wise and actually I need to be clearing some buffer somewhere (I’m still a relative Squirrel newbie!) on the imp side of things?
Thanks in advance, you guys supporting us all so well in the forums is making things awesome!
Code below:
`class RespInput extends InputPort
{
name = “response”;
type = “string”;
function set(serverresponse)
{
server.show(serverresponse);
hardware.uart1289.write(serverresponse);
}
}
local input = RespInput(“response”, “string”);
local output = OutputPort(“request”, “string”);
//then use the input like
imp.configure(“UART Test”, [input], [output]);
hardware.uart1289.configure(115200, 8, PARITY_NONE, 1, NO_CTSRTS);
server.show(“making request . . .”);
output.set(“testing 12345”);`