I am currently working on a project for school and I’m experiencing some difficulties.
I attached some speakers to a swing, used an MP3 shield to play music and attached this to an Arduino. The idea is that, when the swing goes faster, the music changes (the rhythm goes faster/slower according to how fast you’re going). I am using an accelerometer to measure the angles of the swing (my teachers recommended me to use this sensor) but when I tested this, I noticed that the music constantly changes (which is pretty obvious, since the angles keep changing).
I’m looking around for solutions on the web (maybe using another sensor or change something in the code), but I can’t seem to find any.
Can anyone think of a creative way to fix this problem?