void Trinbot::init() { k_heading = 2.0; k_velocity = 1.0; line_thresh = 210; flameThresh = 700.0; leftLineThresh = line_thresh; rightLineThresh = line_thresh; co2Servo_up = 100; co2Servo_down = 0; attachMotor(4, 5); // left motor attachMotor(7, 6); // right motor left_motor.flipDirection(); frontServo.attach(3); co2Servo.attach(11); flDistSens.attach(A1); rlDistSens.attach(A9); frDistSens.attach(A11); rrDistSens.attach(A12); frontDistSens.attach(A10); flameSens.attach(A5); co2Servo.write(co2Servo_up); lineSensLeft.attach(A14); lineSensRight.attach(A13); /* pinMode(11,INPUT); pinMode(12,INPUT); lineSensLeft.init((unsigned char[]) {11}, 1); lineSensRight.init((unsigned char[]) {12}, 1); */ }
Motor::Motor() { // constructor attachMotor(-1, -1, -1); }
Motor::Motor(int Dir1, int Dir2, int Pwm ) { // parameterised constructor attachMotor(Dir1, Dir2, Pwm); }