Scientists have developed a 3D-printed 'smart cap' that uses embedded sensors to wirelessly monitor the freshness of milk in cartons.