0

Neotrellis: trying to press two buttons at once
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Neotrellis: trying to press two buttons at once

by marccobe on Sun May 23, 2021 6:46 am

Hi, I have built a neotrellis grid 4x4 with a M0 feather. So far so good.
I uploaded the basic sketch and everything seems to work fine except when I press two buttons at once (as I want to use my built to trigger polyphonic sounds from a midi device). Sometimes one of the two lights stays on until I press the button again. Is this a faulty behaviour? I have seen some issues of the neotrellis activating an entire row at once. This is not happening as I have built a case which keeps the buttons really straight, but I am not sure this other issue I am explaining has something to do with it or not.
I am attaching a video so that it gets more clear...hope you can help.
https://youtu.be/8xlwP9pF2gI


Thanks a lot!

marccobe
 
Posts: 8
Joined: Thu Dec 06, 2018 7:49 pm

Re: Neotrellis: trying to press two buttons at once

by dastels on Sun May 23, 2021 8:26 am

It sounds more like a software issue. What is your code? Does it happen only with a simultaneous press?

Dave

dastels
 
Posts: 6861
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neotrellis: trying to press two buttons at once

by marccobe on Sun May 23, 2021 8:46 am

Hi Dave,

I am using this specific code for sending MIDI https://github.com/jedgarpark/neotrelli ... SBMIDI.ino
Anyway, it happens the same either with this code or the seesaw examples (Basic & interrupt ones). It just happens indeed with simultaneous press of buttons. It works completely fine with one button press at a time.
Thanks
Marc

marccobe
 
Posts: 8
Joined: Thu Dec 06, 2018 7:49 pm

Re: Neotrellis: trying to press two buttons at once

by dastels on Sun May 23, 2021 9:00 am

My thought is that the library isn't written to work well with simultaneous or near simultaneous presses. Ideally, the event should contain an array of button numbers corresponding to the press/release event. Being better about reporting every event would help but might introduce timing issues for what really should be simultaneous events. Given that there's a human in the loop, it's probably not that much of a hard-realtime situation.

I see you're using C++. I'll have a peek at the library and see if anything jumps out at me.

Dave

dastels
 
Posts: 6861
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neotrellis: trying to press two buttons at once

by marccobe on Sun May 23, 2021 9:12 am

Alright, it makes total sense.
Indeed I am open to use any language or library as far as I can use the neotrellis to send midi messages, which is my main goal.
So far I am using a Feather M0 but probably there is a better hardware for this purpose too (a teensy I'd guess)

Thanks!
Marc
Last edited by marccobe on Sun May 23, 2021 10:02 am, edited 1 time in total.

marccobe
 
Posts: 8
Joined: Thu Dec 06, 2018 7:49 pm

Re: Neotrellis: trying to press two buttons at once

by dastels on Sun May 23, 2021 9:24 am

If you use C++ a FeatherM0 should be fine. For CircuitPython I'd suggest an M4 Express or better (i.e. more memory).

Dave

dastels
 
Posts: 6861
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neotrellis: trying to press two buttons at once

by marccobe on Sun May 23, 2021 10:12 am

Ok! Anyway please let me know if you find something useful in the actual Adafruit libraries so that I can use the M0 with simultaneous presses.
Thanks!

marccobe
 
Posts: 8
Joined: Thu Dec 06, 2018 7:49 pm

Please be positive and constructive with your questions and comments.