Motor direction works with pwm, not with DIO

Hey, I have a Motor which has a Input for the direction of the motor. If I use pwm to set it to high or low it works. But if i only use a digital Output it doesnt work. Also when i connect it to 5v or ground it works. I always figured thats the same when i set a digital output, expect the maximum current it can supply. But for a signal for direction i suppose you dont need a lot of current.


Okay, sorry, solved it --> one of the grounds wasnt plugged in :(