Project

General

Profile

Statistics
| Revision:

root / trunk / code / behaviors / james / main.c @ 1520

History | View | Annotate | Download (462 Bytes)

1 1520 jykong
]
2 1519 jykong
        /* Initialize the dragonfly boards, the xbee, and the encoders */
3
        dragonfly_init(ALL_ON);
4
        xbee_init();
5
        encoders_init();
6
7
        while (1) {
8
                /* Drive left, set orbs, and wait */
9
                orbs_set_color(RED, GREEN);
10
                motor_l_set(FORWARD, 160);
11
                motor_r_set(FORWARD, 255);
12
                delay_ms(TIME_DELAY);
13
14
                /* Drive right, change orb colors, and wait */
15
                orbs_set_color(PURPLE, BLUE);
16
                motor_l_set(FORWARD, 255);
17
                motor_r_set(FORWARD, 160);
18
                delay_ms(TIME_DELAY);
19
        }
20
21
}