opto-coupler: transistor vs logic

Grumpy_Mike:
I find it hard to believe that those are real signals, they look like artifacts especially with such a small pull up resistor.

What do you mean by artifacts? I tried Googling "electrical noise artifact", but I got only medical stuff.

I'll see if using normally closed switch helps.