Sign up ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

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

I used the library at http://github.com/jeroendoggen/Arduino-MMA7361-library to get my accelerometers working properly, but I'm just having difficulty coming up with a sketch in the code to getting all the acceleration data out in "Burst".

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 sent simultaneously '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 http://www.freescale.com/files/sensors/doc/data_sheet/MMA7361L.pdf.

share|improve this question

migrated from electronics.stackexchange.com Sep 8 at 23:50

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

1  
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 at 11:12
    
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 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 at 22:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.