extended example script for 4x7 segment display and motion detector