Low memory available, stability problems may occur

Hey guys,
I am a complete beginner and I am taking a module in university where i need to work with Arduino. I have connected my Uno board with 1Sheeld and ultrasonic sensor. I am using the One sheeld app on my phone and what i am trying to do is reduce or increase the volume of the song my simply going closer/further to the ultrasonic sensor.
I have the code but after trying to upload it a couple of times i keep on getting the same error: Low memory available, stability problems may occur.
Here is my code, i appreciate your help a lot:

#include <OneSheeld.h>

const int trigPin = 2;
const int echoPin = 4;
long distance_cm, cm, duration;

void setup () {
OneSheeld.begin();
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}

void loop()
{
if (ToggleButton.getStatus())
MusicPlayer.play();
else
MusicPlayer.pause();
distance_cm = ultrasonic();
MusicPlayer.setVolume( map( distance_cm, 2, 30, 0, 10));

}

long ultrasonic()
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

cm = duration / 29 / 2;

return cm;
}

I think you may be missing a library file from 1Sheeld you have included the one but for eg. if I am using my phone as a keyboard I need to also include the keyboard library file. If you go to their site and look at the feature you are using there should be an additional library file you need to #include otherwise it may be trying to load all the features. There are specific libraries for each of their features.