Port of Arduino Pixy Cmucam5 library.
Fork of pixy by
Diff: Pixy.cpp
- Revision:
- 1:6ab45d67f36d
- Parent:
- 0:ed8dc4531ac1
--- a/Pixy.cpp Sun Nov 16 11:52:55 2014 +0000 +++ b/Pixy.cpp Fri Mar 23 15:47:32 2018 +0000 @@ -20,6 +20,15 @@ blocks = new Block[blockArraySize]; } +Pixy::Pixy(PinName tx, PinName rx) +{ + m_link = new PixyLinkUART(tx,rx); + skipStart = false; + blockCount = 0; + blockArraySize = PIXY_INITIAL_ARRAYSIZE; + blocks = new Block[blockArraySize]; +} + Pixy::~Pixy() { delete[] blocks; @@ -62,7 +71,7 @@ if (checksum == sum) blockCount++; else if (pc) - pc->printf("cs error\n\r"); + //c->printf("cs error\n\r"); w = m_link->getWord(); if (w != PIXY_START_WORD) @@ -107,7 +116,7 @@ return true; else if (w == PIXY_START_WORDX) { if (pc) - pc->printf("reorder\n\r"); + // pc->printf("reorder\n\r"); m_link->getByte(); // resync } lastw = w;