The making of a smart pillow