PID Trainer

by Ankush Girotra. Carnegie Vanguard High School, Team 285.

API


getArmPosition()

Returns a value between 0 and 360 representing the current position of the arm from the arm position sensor, where 0 represents the start position and 360 represents one full clockwise rotation.

setArmPower(power)

Sets the motor power. Takes a value between -127 and +127, where positive values apply a force in the clockwise direction.

setGraphTarget(target)

Takes a value between 0 and 360 representing the target position and draws a target line on the graph.

setGraphVariable(x)

Sets a number between 0 and 1 that the graph will plot in purple. Use for debugging.

timeout(callback, time)

Calls the [callback] function after the time given in the [time] variable in milliseconds.

Copyright (c) Ankush Girotra 2019. All rights reserved.