Skip to content

Instantly share code, notes, and snippets.

@dan82840
Created May 15, 2019 08:57
Show Gist options
  • Save dan82840/95179bbfab0180677e70f743aa94a10b to your computer and use it in GitHub Desktop.
Save dan82840/95179bbfab0180677e70f743aa94a10b to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# setup-moti-fitness-data-v2.sh [MAC Address] {[Sleep Time]}
MAC=${1:-DB:52:25:C6:33:58}
ST=${2:-600}
echo "Sync time !!!"
moti $MAC write 0x001f FD1004894AD15CFE
echo "Finish Data !!!"
moti $MAC write 0x001f FD400101FE
echo "Start Course !!!"
moti $MAC write 0x001f FD2009010144332211010001FE
echo "Start Fitness !!!"
moti $MAC write 0x001f FD3003010100FE
echo "Sleep ${ST}s !!!"
sleep $ST
echo "Stop Fitness !!!"
moti $MAC write 0x001f FD3003020100FE
echo "Stop Course !!!"
moti $MAC write 0x001f FD2009020144332211010001FE
echo "Setup MOTI Fitness data done !!!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment