Announcement

Collapse
No announcement yet.

EVE Stack Overflow Trying to use sys_SetTimerEvent()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • EVE Stack Overflow Trying to use sys_SetTimerEvent()

    Hi,

    quick edit: I'm using aGen4-ULCD-43DCT-CLB, since i forgot to mention that.

    I've been trying now for the past 2 days to get this to work, without any luck, I'm trying to make a control panel for an amplifier with a digitally controlled equalizer, with a visualizer shown on screen, however I'm having trouble getting the Visualizer to properly work, and have now hit an EVE Stack Overflow when trying to run my application, so i need help.

    The basic principle for how i'm trying to get the visualizer to work is that i'm using a Teensy 4.0 Microcontroller board to run an FFT on my audio signal, which is then sent to the Diablo16 display via I2C, that part i can get working just fine, and i got the Spectrum working as a Visualizer as well, at least in my test sketch (Test sketch is attached in SpectrumTestSketch.zip), from there i thought great, i'll go ahead and implement that into my application, and troubleshoot any issues that pop up from there, and i tried, but it just, won't work and i can't for the life of me figure out why.

    I'm trying to update the spectrum & relevant I2C values through sys_SetTimerEvent(), and then starting the timers in question when the correct form is running, so they don't try and run when i'm in my menu forms, but seemingly no matter what i do i can't get it to work, at first it just didn't run, then i got it to run once if i went into my menu form and back, and now the application crashes every time it tries to run.

    I've attached my Spectrum Test Sketch (as mentioned earlier) and my main application (SvendeProjekt.zip) to this post, everything relevant to the sketches should be in there.

    if anyone can take a look at this and at the very least point me in the correct direction i would be extremely thankful.

    Regards,
    Weirdwolf.
    Attached Files
    Last edited by weirdwolf; 5 days ago.

  • #2
    Personally i think the problem lies with the Timer functions, is there any other way to implement a Timer, say like the arduinos Millis() function?

    Comment


    • #3
      Hi,

      I have tried your project and ran into the same issue. We're still testing it at the moment,

      I personally think it would work better without the timers and the updates were done in the mainloop and also the spectrum would benefit from only updating bars that have changed in value so that there is less time spent updating all the bars if some haven't changed.

      Best regards

      Paul

      Comment


      • #4
        while it does run without the timers, it becomes extremely "laggy" because it's busy communicating with my Teensy controller all the time, I tried using the sys_T() function to make a timer via an IF statement, but got the samme "laggy" behavior, while it's on the HomeScreen form the rapid updates and I2C communication causes the entire form to just be very slow.

        I've given up on the sys_SetTimerEvent and sys_SetTimer functions, but i still feel like i need some way to slow down the very frequent I2C and spectrum updates, since they're the ones that seem to slow the form down, I'm just not sure how to stop them from slowing down the form, while still keeping their updates frequent enough that they're actually useful.
        Last edited by weirdwolf; 3 days ago.

        Comment


        • #5
          Hi,

          Would you be able to send me what you have now without the timers and I will see what can be done about reducing the laggy feel.

          Best regards

          Paul

          Comment


          • #6
            Absolutely, and thanks a lot for the quick responses.

            The functions for updating the spectrum values (the I2C comm one) and the function for updating the spectrum itself are updateFFT() and updateVisualizer(), so you don't have to guess, with the laggy form function being HomeScreen().
            Attached Files

            Comment


            • #7
              Thank you,

              I will see what can be done.

              Best regards

              Paul

              Comment

              Working...
              X