public void setup() {

    size(800, 600);

    background(255);
    color(255);
    size(800, 600);
    frameRate(24);
    smooth();
    pollData.start();
  }
            @Override
            public void run() {
              while (true) {
                // TODO Auto-generated method stub
                // print("start");

                if (serial != null) buffer.add(device.parse(serial.input));
                try {
                  Thread.sleep(1);
                } catch (InterruptedException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
                }
              }
            }