Skip to content

Instantly share code, notes, and snippets.

@mhanney
Created July 26, 2017 05:45
Show Gist options
  • Save mhanney/d246127f6d4994f077bc05a504fce517 to your computer and use it in GitHub Desktop.
Save mhanney/d246127f6d4994f077bc05a504fce517 to your computer and use it in GitHub Desktop.
SimulANT ANT+ FE-C SendTrackResistance
import clr
import System
import time
clr.AddReference('ANT+ProfileLib')
from AntPlus.Profiles.FitnessEquipment import ControlTrackResistancePage
simulator.TurnOn()
command = ControlTrackResistancePage()
command.Grade = 0x05 # unsigned short hex, 5% ?
simulator.SendTrackResistance(command)
# wait 10 seconds.
time.sleep(10)
command.Grade = 0x0A # 10% ?
simulator.SendTrackResistance(command)
# more of the same ...
# Stop execution of the script, called when user presses the "Stop" button
def stopScript():
simulator.TurnOff()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment