Make sure to replace "com.your-company:your-product-name" with your ProductUID from Notehub Setup. Also, replace "a-serial-number" with the serial number of other relevant identifier for this particular sign/door (e.g. "refrigerator door").
Next, enter this command to optimize battery, assuming our power source is the LiPo battery:
The "start": true parameter tells the Notecard to begin motion tracking. The "threshold": 0 parameter makes it so the Notecard will sync motion event notes to Notehub only when its orientation changes. So, for example, if we've mounted our device to a sign and that sign gets bumped but doesn't tilt/tip over, no motion event will be synced. If the sign falls over, an event will be synced. You can read more about these parameters in our card.motion.sync documentation.
With those commands entered, unplug the Notecarrier's USB connection so that the Notecard's running on LiPo power. Flip the Notecarrier over on your work surface. Go to your project on Notehub, open the Events tab, and soon enough you should see an event like this in _motion.qo for the flip:
alert: This will always be true when we get a _motion.qo note after issuing card.motion.sync.
motion: The number of motion detections since the last note.
movements: A string of base-36 characters, where each character represents the number of movements in each bucket during the sample duration. Each character will be a digit 0-9, A-Z to indicate a count of 10-35, or * to indicate a count greater than 35.
orientation: The orientation of the Notecard in space. In the above example, I flipped the Notecarrier over so that the Notecard was resting against my table, so the orientation is "face-down."
temperature: Temperature reading from the Notecard.
tilt: The number of orientation changes since the last motion note.