Script for recording data from SMART