Go Down

Topic: processing e arduino - errori quando esco dal programma (Read 10 times) previous topic - next topic

SistemaL

Salve, ho scritto questo piccolo codice, il codice funziona, ma se esco con la X della finestra l'ide processing mi da questi errori:

Code: [Select]










finishLifecycleAction(com.jogamp.opengl.util.FPSAnimator$4): ++++++ timeout reached ++++++ main-Display-.windows_nil-1-EDT-1
finishLifecycleAction(com.jogamp.opengl.util.FPSAnimator$4): OK false- pollPeriod 31, blocking true -> res false, waited 1000/1000 - main-Display-.windows_nil-1-EDT-1
 - com.jogamp.opengl.util.FPSAnimator[started true, animating true, paused true, drawable 1, totals[dt 0, frames 5, fps 0.0], modeBits 1, init'ed true, animThread Thread[main-FPSAWTAnimator#00-Timer0,5,main], exclCtxThread false(null)]
    [2]: com.jogamp.opengl.util.AnimatorBase.finishLifecycleAction(AnimatorBase.java:633)
    [3]: com.jogamp.opengl.util.FPSAnimator.pause(FPSAnimator.java:363)
    [4]: jogamp.opengl.GLAutoDrawableBase.destroyAvoidAwareOfLocking(GLAutoDrawableBase.java:321)
    [5]: jogamp.opengl.GLAutoDrawableBase.defaultWindowDestroyNotifyOp(GLAutoDrawableBase.java:285)
    [6]: com.jogamp.newt.opengl.GLWindow.access$000(GLWindow.java:119)
    [7]: com.jogamp.newt.opengl.GLWindow$1.run(GLWindow.java:131)
    [8]: jogamp.newt.WindowImpl.windowDestroyNotify(WindowImpl.java:4668)
    [9]: jogamp.newt.driver.windows.DisplayDriver.DispatchMessages0(Native Method)
    [10]: jogamp.newt.driver.windows.DisplayDriver.dispatchMessagesNative(DisplayDriver.java:124)
    [11]: jogamp.newt.DisplayImpl.dispatchMessages(DisplayImpl.java:753)
    [12]: jogamp.newt.DisplayImpl$7.run(DisplayImpl.java:672)
    [13]: jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:347)


Il codice è questo:
Code: [Select]

import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int ledg = 11;
int ledr = 12;

void setup()
{
  size(200, 200, P3D);
  arduino = new Arduino(this, Arduino.list()[0], 57600);
  arduino.pinMode(ledg, Arduino.OUTPUT);
  arduino.pinMode(ledr, Arduino.OUTPUT);
}

void draw()
{
  arduino.digitalWrite(ledg, Arduino.LOW);
  arduino.digitalWrite(ledr, Arduino.HIGH);
  delay(1000);
  arduino.digitalWrite(ledg, Arduino.HIGH);
  arduino.digitalWrite(ledr, Arduino.LOW);
  delay(1000);
}

void dispose()
{
  arduino.digitalWrite(ledg, Arduino.LOW);
  arduino.digitalWrite(ledr, Arduino.LOW);
}

void keyPressed() {
  if (key==ESC) {
    key=0;
    arduino.digitalWrite(ledg, Arduino.LOW);
    arduino.digitalWrite(ledr, Arduino.LOW);
    exit();
  }
}


e lo schema è il seguente che trovate allegato nel post.

come mai fa cosi?

Grazie mille , sto leggendo guide qui e la.

Vi ringrazio in anticipo.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy