Closed celoranta closed 4 years ago
Realized since my post that pwm has nothing to do with analog input pins. Issue still outstanding. Edited.
Realized since my post that pwm has nothing to do with analog input pins. Issue still outstanding. Edited.
..aaand I've realized that my previous realization was incorrect. Those pins are capable of analog output via PWM as well as analog input. Re-edited to re-add previously deleted.
Ah. The problem was me. Go figure. C logical errors. sizeof() returns byte qty and not index qty. Problem was compounded by many similar errors. All fixed.
Ah. The problem was me. Go figure. C logical errors. sizeof() returns byte qty and not index qty. Problem was compounded by many similar errors. All fixed.
I need to make the 16 buttons from note 36 to 51, can you send me the code via my email: vuha.hau@hyper.vn, i can't find how to program the note buttons. Thank you!
Hello All.
Relatively new programmer and newb embedded system guy here, but old-time midi guru.
My programming/hardware/USBComposite library is encountering a weird issue that I can't seem to troubleshoot in the code. I am trying to dedicate 8 pins as outputs (PWM-capable outputs, to drive LEDs) and another 8 as digital inputs.
Everything is working well to a point:
A press-and-hold on an input sends a MIDI note ON out via USB. The associated output port lights up the LED. A release sends the corresponding MIDI note OFF, and the LED turns back off. Additionally, a quick 'tap' of an input switch sends a MIDI ON note with no corresponding OFF. The subsequent press/release sends the OFF upon release.
BUT... then I set certain outputs to HIGH, and suddenly I am sending several predictable-yet-unintended MIDI note ON and OFF messages with every input trigger cycle. I have no idea why the status of an output port should be affecting the MIDI data being triggered.
For my part, this could be hardware, this could be library, or this could be my own poor coding/hardware knowledge.
I'll post my code below. Any insight would be appreciated.