Project

General

Profile

Statistics
| Revision:

root / branches / encoders / code / behaviors / spline / master / master.c @ 1197

History | View | Annotate | Download (671 Bytes)

1
#include <dragonfly_lib.h>
2
#include <wireless.h>
3
#include <termios.h>           
4
#include <stdio.h>
5
#include <unistd.h>
6

    
7
#define GROUP 1
8
#define TYPE 0
9

    
10
void packet_receive (char type, int source, unsigned char* packet, int length);
11

    
12
PacketGroupHandler packetHandler = {GROUP, 0, 0, &packet_receive, 0};
13

    
14
void packet_receive (char type, int source, unsigned char* packet, int length) {
15

    
16
}
17

    
18
int main (void) {
19
          dragonfly_init(SERIAL | USB | COMM | ORB | ANALOG | MOTORS | BUZZER);
20
        wl_init();
21
  
22
  while (1) {
23
          char vel[4] = {170, 0, 170, 1};
24
          wl_send_global_packet(GROUP, TYPE, vel, 4, 0);          
25
          wl_do();
26
  }
27
  
28
}
29