Well done for cracking how to use the LCD. I was well impressed at the animated butterfly.
You may like to go to this good webpage: http://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/ for some “fusion” between the ultrasonic distance sensor and the LCD.Do please note however that there are a few MISTAKES in the wiring diagram for the SR04 Ultrasonic sensor. The module gets VERY HOT and VERY QUICKLY (on the way to a burn out) if you connect it as shown in his diagram. (I informed him just now about it). The correct wiring for the SR04 is below…
Also, IF you followed the same wiring for the LCD screen that we used before (the diagram below in in this previous configuration) then you may want to change mechatronics’s LCD with the SR04 code. re-designating the pins as before. So, change the line…
LiquidCrystal lcd(1, 2, 4, 5, 6, 7); // Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
LiquidCrystal lcd(12, 11, 5,4,3,2); // Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
Also Dejan Nedelkovski of Mechatronics has a GREAT video/page on how to connect a servo motor to a SR04 distance sensor to make a sonar/radar. http://howtomechatronics.com/projects/arduino-radar/ Fantastic stuff!
Also check out this video: https://www.youtube.com/watch?v=fhN_KsRvx-I I like the way the display gives a graphical readout of the near object AND (seemingly simultaneously) the far object. See Steves page on his website that discusses this in more detail: http://homediyelectronics.com/projects/arduino/arduinodistancesensor/
When you guys left, I built the circuit so I could have an accurate schematic to show you as to how to set it up quickly… (click on it to enlarge if necessary)