Hi guys,

So, I'm building a multi-effects box with the Teensy 4.0 as my major project of my audio engineering bachelor's degree and I've hit a bit of an issue. Please note that a mandatory requirement for the major project was to explore and learn a new skill that would take up at least 300 hours of work, so before I started this project, I had no prior experience with Teensy/Arduino. So, if there are any blatant/obvious errors here, please forgive me.

I'm using the Teensy 4.0 with the Rev. D audio shield, as well as a few hardware components: LCD screen, three rotary encoders, an ultrasound distance sensor, a joystick and one throw switch. All of this hardware stuff is 5V, so I've also got four bi-directional logic level converters from SparkFun, which all of the hardware stuff goes through before going into the Teensy. In preparation for this project build, I tried all of the hardware pieces with an Arduino Uno and compiled code for each individual item, which I had planned to just throw into the Teensy to test that everything was working. To my great dismay, it seems as though nothing is working. Everything is getting power (LCD screen lights up, for instance), but nothing works as it's supposed to (and no I2C devices recognised when running the i2c_scanner from the Arduino forums).

When I try to run the rotary encoder code that I have saved, which worked flawlessly with the Arduino Uno, I get such weird results. The code prints to serial whatever is happening with the encoder (counts clockwise turns, counter clockwise turns and button clicks and then prints to serial), but with the Teensy, it always registers a button click and then a clockwise turn. No matter what is done to the physical encoder, it's always a button click and a clockwise turn that registers with the code (if I rotate it fast, in either direction, it registers a button click and then clockwise scrolling). I also tried using the Encoder.h library by Paul, but the there's no change: it doesn't register different directions. With the Encoder.h library, it even reads one step as a couple dozen increments (with the basic example from the library).

As this is my first big project of this sort, I'm having real trouble figuring out what could be wrong. I'm 99% confident that all of my soldering is perfectly fine and that everything is soldered to the right pins. The 5V VCC is daisy chained to all of the hardware components and so is the GND. I've tested continuity from the first 5V VCC pin to the last pin in the chain and there doesn't seem to be a problem with continuity. Same goes for the GND.

My main theory of what might potentially be the issue is that I may have soldered to a pin that I'm "not allowed to use" because of the audio shield. The pins that I've soldered onto are: 0-6, 9-17 and 22 (with pins 14-17 & 22 being the analog pins used for the LCD and the joystick). Going over the audio shield data sheet, these were the pins I thought would be safe to solder over, since I thought they wouldn't be in use for my project. Other than that, I have no idea what could be causing this.

If anyone could take the time to help me out, I would be so grateful as there is so much on the line with this project (basically my BA-degree is on the line).