SD Card data extraction using Bluetooth

Hello everyone!

I've came up with an ambitious project that it is working just fine and as intended and I would like to add an important functionality to it. The problem is that I don't know which solution is better and simpler for this project and how to implement it. I will further explain how things work and how the final project should look like:

The project is using the following modules:

  • Arduino Uno
  • MPU 6050
  • Adafruit Ultimate GPS Breakout v3
  • SD Card Reading Writing Module

The MPU 6050 reads acceleration values on a particular axis from a vehicle and based on the values, it determines the quality of the road by some intervals. After determining how "good" or "bad" the road is, it takes the coordinates of the vehicle and writes down on the SD card the information based on KML structure to be later on opened up in Google Earth and see where the vehicle traveled and see the quality of the road by drawing with certain colors.

The system stops by pressing a button which stops writing data on the SD card and closes the KML structure. After the trip, I have to manually remove the SD card from the module and plug it in a laptop to read the data. I would like if I can add a Bluetooth module to it so I can extract the data wirelessly, without physical intervention over the system.

The code is attached to this post, I couldn't post it with the script tags, it went beyond the max allowed length.

I'm 100% sure that this code needs some optimizations but it did it's job so far.

The reading from the SD card should be done after the button is pressed and the system stops writing down data.

Any advises or guidance will be very much welcomed and appreciated, thank you! :smiley:

code.ino (11.2 KB)

I'm confused. You say you want to know "which solution is better" but I only see one solution above. Are you just looking for optimization advice? Are there any problems or limitations that you specifically want help with?

The bluetooth is one of the solution that I've understoond it is simpler to implement but if there are other solutions like WiFi or ethernet, I'm up to try any solution.

The dumpfile example included in the IDE probably does all you want. It would act on the button trigger you currently use, but it would probably be better to trigger it from the bluetooth device.