but now I noticed something strange (or not? I don' know): When I rotate the encoder, I get a signal from the BNO every second step. My guess is, when both output channels of the encoder return HIGH, the stm has not enough power anymore. but when only one channel returns HIGH, there is enough for both sensors.
@MrArduino2000 use your multimeter on current measuring mode to measure how much current flows in the 5V* or 3.3V wires to the encoder and to the sensor. Compare this to the 500mA that USB can provide.
(* The STM board is 3.3V, so you should be connecting only 3.3V signals to the input pins, 5V could damage them.)