Is it possible to with the HC-SR04 to develop a system that allows you as the distance e.g.. lower than 40 cm you can control a lcd screen for a certain time?
It is possible to use a HC-SR04 to measure distances. It is possible to display that distance on an LCD screen. It would be helpful if you explained the "control a lcd screen" part. Usually, LCD screens are not unruly devices that need controlling. But, when they are, controlling them only for a certain time is not a good idea.