summaryrefslogtreecommitdiff
path: root/robot/mode_scal.c
blob: bb0473b5893e2a88c2bbe76151da61248dc6e304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "mode_scal.h"
#include "io.h"
#include "modes.h"
#include "orangutan_shim.h"

// callibrates the robot
void w2_mode_scal() {
	for (int counter = 0; counter < 80; counter++) {
		if (counter < 20 || counter >= 60) {
			w2_set_motors(40, -40);
		} else {
			w2_set_motors(-40, 40);
		}

		calibrate_line_sensors(IR_EMITTERS_ON);

		delay_ms(20);
	}

	w2_modes_call(W2_M_PREV);
}