9496 Lynk's site for housing knowledge and information for the team.
void
either//Simple motor class
class motor{
//classes can have fields that store data
int channel; //which port is the motor connected too
double speed = 0; //how fast should the motor be going -1 to 1
motor(int c){ //This is the constructor, it doesn't have a return type or void
channel = c; //channel doesn't get a value set until the consttuctor is run
}
int getChannel(){ //this is a "getter" method it returns a value
return channel;
}
double getSpeed(){
return speed;
}
void setSpeed(double s){ //this is a "setter" method it sets a value
speed = s;
}