Copy of std Ultrasonic range, but returns Max distance on failure so we can assume nothing close to us. My sensor seems to go low on ping capture, not success, so I changed timeout to max round trip to get full range.
Contains encoder KY040 patch, digital pullup input patch, example of usage. Encoder reads boolean inputs to obtain numerical value of revolution. Boolean outputs are used for clockwise and counterclockwise direction detection respectively.
Update LCD display on I2C. Specify Columns and Rows. Init pin can be used to prevent extra clear displays. Passing null string for a Line will leave the line untouched; space will clear a line. Variadic pins for rows of text to display.