@seb I have not attached it yet, was doing the homework on what will work best.
Will try it on the 3.3V, might go with a digital reading as all I am looking for is a true/ false statement to activate the relay
@robert-hh Thanks for your reply.
I only have two sensors at hand now. No matter which one I use, it's ok. Since the principle is completely different. For the two sensors, do you familiar with them? Can you teach me some direction about how to program if you know. It's hard to find the same topic in the website and I am extremely confused now. Thanks! This is the image of the sensor, which provided by my supervisor.0_1519505277502_hc-sr04-sonar-sensor.jpg