option explicit ' forces to declare variables and must be at top of script before anything else. dim BatteryVolts as integer dim Channel1Speed as integer dim Channel2Speed as integer print("starting ... \r") ' Lets user know script is starting top: ' label header BatteryVolts = getvalue(_VOLTS, 2) ' Volts are *10 Channel1Speed = -getvalue(_BLSPEED, 1) ' Channel 1 speed in rpm Channel2Speed = -getvalue(_BLSPEED, 2) ' Channel 2 speed in rpm ' Optional print statement for debug and test. Comment out when done print ("\rV= ", BatteryVolts, " Rpm1 = ", Channel1Speed, " Rpm2= ", Channel2Speed) ' displays the data that was queried and computed wait(10) ' Pause 10ms goto top ' loop forever