Bricklet for sensing distance via infrared