Why does my cursor flicker when I run this code?

edited August 2014 in Arduino

Hello,

My apologies if this isn't in the right place. I am new here and somewhat to Processing, and I'm looking for some help.

I have set up a 50-LED array following the Adalight tutorial described here. I have done everything it guided me to do, and the lights work fantastically. The only problem, however, is that when the code is running (whether that be through Processing or as an exported .exe), my cursor will flicker sporadically. I have tried with every version of Processing, just to make sure, and this problem still occurs. Does anyone have any suggestions? I am using an Arduino Uno and Windows 7 64bit.

Here is the basic code (with minor changes to the LED addressing) that I am using. It is slightly too long to paste.

Thanks in advance, and let me know if I can clarify anything!

Jordan

Answers

  • Do you have this with other sketches as well or just this one?

    What is the frameRate you are getting with the sketch?

  • He's apparently messing w/ AWT internals! Some conflict may arise between that & Processing's renderers!

  • @amnon I'm not running any other sketch, just Adalight, and I'm getting around 15-20FPS with the lights.

    @GoToLoop The only change I made in the Adalight sketch was to change the standard 25 LED array to a 50 LED array. Other than that, it is the same. So if it is messing with AWT internals then I'm not sure why this issue seems to be happening to only me and not anyone else who has done this project.

  • edited August 2014

    It's just a speculation! Processing creates a JFrame "canvas".
    Hence we should avoid using AWT or Swing in order to prevent bugs!

  • I'm not terribly familiar with AWT or Swing, would it be super difficult to fix this in the code? I guess I have some researching to do haha. Thanks for the suggestion

Sign In or Register to comment.