I’m something of a pro at Arduino programming, but this is my first Particle project, and I’m unsure of myself in the dialect of these controllers.
I’m using an Electron to receive data on a serial connection, and I need to store it on an SD card that will later transmit it via GSM to an online database. The data comes in 27k chunks, and there is no handshaking to tell the sending device to wait (the original receiving device was apparently really good at listening).
Is there some way to stream directly to the SD card or would I have to somehow buffer the data in between? I have some idea how to do that on an Arduino but I have no idea if same would work for an Electron.
I can vouch for the @rickkas7 Serial Buffer library. I’m using it and it works great. At slow baud rates, it’s a bit overkill. But for higher bauds rates, it’s a must. I have a barcode scanner hooked up at 9600 baud and I don’t think it has ever returned more than 1 character from the buffer at a time but I’m still using it just in case. I have minimal code in my loop as well which helps clear the buffer fast. Experience will vary.