build a bigger array from Serial.readBytes
hi
i've got array read serial.readbytes ,
and want build bigger array until fixed size reached.
i try with serial.available doesn't work way
i have fill bigger array (4000) little ones (800)
have build byte byte, or there solution group entire arrays until size reached ?
thanks,
cb
i've got array read serial.readbytes ,
and want build bigger array until fixed size reached.
i try with serial.available doesn't work way
code: [select]
char serial_array[800];
void loop() {
if (serial.available() == 4000 ) {
serial.readbytes ( serial_array, 4000);
// stuff
}
}
i have fill bigger array (4000) little ones (800)
have build byte byte, or there solution group entire arrays until size reached ?
thanks,
cb
the receive buffer serial 64 bytes, condition never true.
this statement trying read 4,000 bytes 800 byte buffer. not work, if receive buffer bigger.
which type of arduino using? uno , many of other types have 2,000 bytes of sram, can't hold 4,000 byte array.
can tell more application, trying achieve overall? maybe there different approach not need such large array.
code: [select]
if (serial.available() == 4000 )
this statement trying read 4,000 bytes 800 byte buffer. not work, if receive buffer bigger.
code: [select]
serial.readbytes ( serial_array, 4000);
which type of arduino using? uno , many of other types have 2,000 bytes of sram, can't hold 4,000 byte array.
can tell more application, trying achieve overall? maybe there different approach not need such large array.
Arduino Forum > Using Arduino > Programming Questions > build a bigger array from Serial.readBytes
arduino
Comments
Post a Comment