Expression cannot be used as a function

Eduardo_Veiga:

#define trigPin 4 // define the pins of your sensor

#define echoPin 5

I'm guessing this means you're using an ultrasonic sensor to detect distance. Your code shows you have no understanding of how to use this sensor. You need to first use a simple sketch to become familiar with how to get a reading from the sensor before writing code for that sensor in your actual project. There are a number of libraries you can use with these sensors and they should all come with example sketches. I think this is the most popular one: https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home, assuming it supports your sensor and board. Use the example sketch to make sure your sensor is working correctly and then make sure you understand what every line of that sketch does.