Revision 745
code works good with button press. waiting for object detection code. need several robots and charged batteries for demo video.
driver.c | ||
---|---|---|
5 | 5 |
#include <dragonfly_lib.h> |
6 | 6 |
#include <wireless.h> |
7 | 7 |
#include <wl_token_ring.h> |
8 |
#include <dio.h> |
|
8 | 9 |
#include "bfs_fsm.h" |
9 | 10 |
#include "smart_run_around_fsm.h" |
10 | 11 |
|
... | ... | |
47 | 48 |
|
48 | 49 |
// need color sensor code here |
49 | 50 |
|
50 |
if (0) { // if we find the object
|
|
51 |
if (button2_read()) { // if we find the object
|
|
51 | 52 |
// send packet to call for swarm on object |
52 | 53 |
wl_send_global_packet(SWARM_GROUP,SWARM_ACTION, |
53 | 54 |
NULL,0,0); |
... | ... | |
57 | 58 |
} |
58 | 59 |
|
59 | 60 |
// object manip goes here |
61 |
while(1) { |
|
62 |
wl_do(); |
|
63 |
} |
|
60 | 64 |
|
61 | 65 |
return 0; |
62 | 66 |
} |
Also available in: Unified diff