Closed christopherwk210 closed 5 years ago
The pins that are used can simply be reassigned using the constructor: OPL2::OPL2(byte reset, byte address, byte latch)
.
However in your case the problem look to be pin 12. This pin is reserved in the Arduino SPI library for the MISO signal. The OPL2 board is not using this signal, but using it will likely confuse the Arduino. Please try moving it to a different pin.
Hi,
If your issue still exists then I suggest to share a schematic.
Op 26 jan. 2019 om 15:55 heeft Chris Anselmo notifications@github.com het volgende geschreven:
Sorry, I should have mentioned that I've tried many other pins. Changing out pin 12 for another doesn't seem to help at all. No matter what pins I use, the only thing that causes an issue is initializing the OPL2 library.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
I’m actually all settled, I’m not sure what the issue was but I took everything apart and put it all back together to find it solved. Must have been a wiring issue on my end, thanks for the help.
On Mon, Jan 28, 2019 at 1:29 PM Maarten Janssen notifications@github.com wrote:
Hi,
If your issue still exists then I suggest to share a schematic.
Op 26 jan. 2019 om 15:55 heeft Chris Anselmo notifications@github.com het volgende geschreven:
Sorry, I should have mentioned that I've tried many other pins. Changing out pin 12 for another doesn't seem to help at all. No matter what pins I use, the only thing that causes an issue is initializing the OPL2 library.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DhrBaksteen/ArduinoOPL2/issues/39#issuecomment-458308832, or mute the thread https://github.com/notifications/unsubscribe-auth/AMv37U9sq0E9H59i2qcMXG9-dW976RdYks5vH2vAgaJpZM4aT61Z .
I have this sketch:
Which reads a scan matrix hooked up to a keyboard. It works perfectly as expected as long as I don't call
opl2.init()
. If I uncomment that line though, it stops working. Just uncommenting that line alone causes the serial to print lots of output at once when even pressing a single key, and uncommenting everything to do with the OPL2 library causes the serial output to stop altogether.I'm using all of the default pins for the OPL2 library as stated in the wiki, and the pins I'm using for the scan matrix can be seen in my snippet. If there's something I'm doing wrong please let me know, otherwise there may be an issue with the library.
I'm using an Arduino UNO.