Example #1
0
void setup()
{
    Serial.begin(9600);
    lcd.begin(16, 2);
    detect_serial();
    movement_init();
    sensors_init();
    if (COUNTDOWN_ENABLED) {
        calibrate_countdown();
    }

    path();
} 
Example #2
0
/*-----------------------------------------------------------------------------
Name      :  aps_detect_printers
Purpose   :  Detect printers connected to system
Inputs    :  printers : printers array
             max      : printers array size
Outputs   :  Fills printers array with model and port information
Return    :  number of printers detected
-----------------------------------------------------------------------------*/
int aps_detect_printers(aps_printer_t *printers,int max)
{
        int i;
        int n = 0;
       
        memset(printers,0,max*sizeof(aps_printer_t));

        /*detect serial printers*/
        i = detect_serial(&printers[n],max);
        n += i;
        max -= i;

        /*detect parallel printers*/
        i = detect_parallel(&printers[n],max);
        n += i;
        max -= i;

        /*detect USB printers*/
        i = detect_usb(&printers[n],max);
        n += i;
        max -= i;

        return n;
}