Revision 1981
Added new barcode reading to linefollowing project - first barcode is still wrong, however.
lineFollow.h | ||
---|---|---|
6 | 6 |
#define LWHITE 0 |
7 | 7 |
#define LGREY 1 |
8 | 8 |
#define LBLACK 2 |
9 |
#define BAD_READING 3 |
|
9 | 10 |
#define CENTER 3 |
10 | 11 |
#define LINELOST -1 |
11 | 12 |
|
... | ... | |
15 | 16 |
#define NOLINE -50 |
16 | 17 |
#define FULL_LINE -51 |
17 | 18 |
|
19 |
|
|
18 | 20 |
//! Number of consecutive barcode color readings for a significant reading. |
19 | 21 |
#define MAX_DURATION 20 |
20 | 22 |
//! Number of consecutive white barcode readings before a barcode reset. |
21 | 23 |
#define TIMEOUT_DURATION 1000 |
22 | 24 |
//! Anything lower than this value is white |
23 |
#define GREY_THRESHOLD 250
|
|
25 |
#define GREY_THRESHOLD 500
|
|
24 | 26 |
//! Anything higher than this value is black |
25 |
#define BLACK_THRESHOLD 650
|
|
27 |
#define BLACK_THRESHOLD 750
|
|
26 | 28 |
|
27 | 29 |
#define NUM_READINGS 20 |
28 | 30 |
|
Also available in: Unified diff