Created
July 26, 2017 05:45
-
-
Save mhanney/d246127f6d4994f077bc05a504fce517 to your computer and use it in GitHub Desktop.
SimulANT ANT+ FE-C SendTrackResistance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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