How to combine these three to comunicate

Good Morning,
I’m having some problems in programing these three to comunicate each other, i’m using a arduino nano 3.0, a micro sd reader and a accelerometer and gyroscope, what i want to do is: Make a sound when turns on, a sound when the object movement is very slow, a sound when the movement is fast a sound when the object hits something and a sound when turns off. Is a project for the college.
Can some one help me please?

Can some one help me please?

What part do you need help with?

Start by writing the comments:

void loop()
{
   // Read the accelerometer

   // Read the gyroscope

   // Determine speed

   // Did we hit something?

   // Are we being turned off?
}

Then, add code below each comment to do something related to the comment. Add more comments, and code, as needed.

Do most of the real work in functions, with comments.

I'm getting, the part i'm having a difficult is to link the event to reproduse the particular sound, for example: I swing the object then play the sound

rafa0712:
I’m getting, the part i’m having a difficult is to link the event to reproduse the particular sound, for example:
I swing the object then play the sound

Do you know anything about programming?

First you need to check that you know how to read values from the accelerometer.

Then you need to look at those values, and determine what it is you are looking for, so as to differentiate between different types of movement.

Then you write the code to do so, possibly using data in an array or something, for remembering the N past measurements, calculating averages etc, to produce a result for deciding what sound to make.

I know, the most in the part of games, i use java, don't know much of C++. I have never use to do such a thing

(deleted)

Have a look at Planning and Implementing a Program

...R

I have to show this in a month and a half.

rafa0712: I know, the most in the part of games, i use java, don't know much of C++. I have never use to do such a thing

If you really know Java, then you can think of functions as static methods within a single class.

Take an hour or two scanning through some introductory text about C and C++.

I had never written any C++ until February or so, having worked exclusively with Java for the last 20+ years. Before that, in University and in my first job, I programmed C.

C is a very simple language. With java background you really should have little trouble with it.