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

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.

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

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support