I need help developing a simple sketch that can read data simultaneously from 3 analog accelerometers and send it in 'burst mode' to be stored on an SD card, to reduce the effect of latency.

I used this library to get my accelerometers to work properly, but I'm just having difficulty coming up with a sketch in the code to getting all the acceleration data out in bursts.

Your help will be much appreciated.

What I meant by 'burst mode' is that all acceleration data from all three sensors connected to the Arduino should be saved at once to the file on the SD card (a temporary measure, as I'll have to send this data via Bluetooth to a base station as I build the system up to be able to receive more data from multiple Arduinos).

Although there would be a delay of about 1/10th of a second between each reading from the three sensors, the idea behind it is to be able to read and write off the data in this said simultaneous burst mode at a high sample rate (this will be adjusted with an oscilloscope at a later stage) to prevent data from being lost or chunked up.

Here is a link to the datasheet as requested.

  • 2
    We really need more information here - what does burst mode mean? Could you add a link to the accelerometer datasheet? Please do this by editing the original answer, not by adding a comment as this makes the question hard to read.
    – stefandz
    Sep 8, 2015 at 11:12
  • 1
    I'm not sure what the difficulty here is. You read some sensors, gather the data, and then write a line of text to a file, right?
    – Nick Gammon
    Sep 10, 2015 at 21:13
  • Yes that's the basic idea. But i found out that I started to loose data as I added additional MMA7361 sensors to the sketch, so the advice I got was to edit my sketch in order for me to send of each set of data in 'bursts' before the current data is read thereby emptying the memory of any data to avoid errors resulting from data accumulation. I used the delay feature to ensure that all the data are read and sent before a new set is read again, but increasing the sampling rate of the board results in the present state of the sketch, large data chunks lost over a period
    – dragondada
    Sep 10, 2015 at 22:14

1 Answer 1


What you need to do instead is to declare an array buffer of the data type you need to send, and send it through Serial. The array buffer could be of any length of your choosing, then you reiterate through on a for loop till all the contents of the buffer are read out which is essentially the burst mode you require.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.