pixy

Dependencies:   mbed

Gimbal_PixyTest.cpp

Committer:
halusis
Date:
2018-10-25
Revision:
0:fc7c5285fa79

File content as of revision 0:fc7c5285fa79:

#include "mbed.h"
#include "PinAssign.h"
#include "GlobalVariables.h"
#include "PixyData.h"

Ticker DebugTimer;

bool fDebugTimer=0;

void DebugTimer_isr(void)
{
    fDebugTimer=1;
}

int main() 
{
    pc.baud(115200);
    pixy.baud(115200);
    
    DebugTimer.attach(&DebugTimer_isr,0.5);
    
    pc.printf("Start\n");
    while(1) 
    {
        //if(pc.readable()) pixy.putc(pc.getc());
        //if(pixy.readable()) pc.putc(pixy.getc());
        
        if(pixy.readable()) PixyData();
        if(fDebugTimer==1)
        {
           // pc.printf("sigN:%d xObs:%d yObs:%d widthObs:%d heightObs:%d\n",PixyChks, SigNum, XObs, YObs, WidObs, HeiObs);
            fDebugTimer=0;
        }
    }
}