-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathecho.cpp
42 lines (34 loc) · 970 Bytes
/
echo.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// begin license header
//
// This file is part of Pixy CMUcam5 or "Pixy" for short
//
// All Pixy source code is provided under the terms of the
// GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).
// Those wishing to use Pixy source code, software and/or
// technologies under different licensing terms should contact us at
// [email protected]. Such licensing terms are available for
// all portions of the Pixy codebase presented here.
//
// end license header
//
#include <Pixy.h>
Pixy pixy;
int main()
{
int j;
uint16_t blocks;
while (1) {
blocks = pixy.getBlocks();
if (blocks) {
std::cout << "Detected " << blocks << std::endl;
for (j = 0; j < blocks; j++) {
std::cout << " block " << j << " ";
pixy.blocks[j].print();
}
} else {
std::cout << "No blocks detected" << std::endl;
}
}
return 0;
}