Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / colonet / utilities / dragonfly_wireless_relay / dragonflyWirelessRelay.c @ 13

History | View | Annotate | Download (520 Bytes)

1
/**
2
 * Eugene Marinelli
3
 * 4/5/07
4
 *
5
 * Robot wireless relay - dragonfly edition
6
 */
7

    
8
#include "dragonfly_lib.h"
9
#include <stdio.h>
10
#include <string.h>
11

    
12
int main(void)
13
{
14
  orb_init();
15
  orb_enable();
16
  usb_init();
17
  xbee_init();
18

    
19
  // orb_set_color(GREEN);
20
  orb_set_color(GREEN);
21

    
22
  //UCSR0B |= _BV(RXCIE);
23
  UCSR1B |= _BV(RXCIE);
24
  sei();
25

    
26
  while (1) {
27
    xbee_putc(usb_getc());
28
    orb_set_color(YELLOW);
29
  }
30
  
31
  return 0;
32
}
33

    
34
ISR(USART1_RX_vect)
35
{
36
  //char buf = UDR1;
37

    
38
  usb_putc(UDR1);
39
  //orb_set_color(RED);
40
}