Beispiel #1
0
/** Configures the USB and radio communication then calls the processBytesFromUsb and 
* processBytesFromRadio functions. 
**/
void main()
{
    // required by wixel api:
    // http://pololu.github.io/wixel-sdk/group__libraries.html
    systemInit();
    usbInit();
    radioLinkInit();


    // wait for a wireless pairing
    // between two wixels
    // blink yellow LED while connection is being established
    while(!radioLinkConnected()) {
        yellowLedOn ^= 1;
        updateLeds();
        delayMs(DELAY_MS);
    }

    // turn off LED
    yellowLedOn = 0;

    // process bytes
    while(1)
    {
        boardService();
        updateLeds();
        usbComService();
        processBytesFromUsb();
        processBytesFromRadio();
  
    }
}
Beispiel #2
0
void main()
{
    systemInit();
    usbInit();

    while(1)
    {
        boardService();
        updateLeds();
        usbComService();
        processBytesFromUsb();
    }
}