Digital potentiometer with op amp

The LM324 output can go no higher than 1.5V below the supply voltage.

Also, your two 22k resistors may be outside their range in just the right direction to get you a gain of less than 2.

Another also, the 5V in your Arduino might be a little low.

Yet another also, the output of an Arduino may not go quite to 5V with any load on it.

Simplest way to fix it? Put a 1k trimmer potentiometer between the two 22k resistors, and connect the wiper arm to the inverting input of the Op Amp.

BTW, an LM324 has four sections. You -must- connect the unused sections or they may, can, and will cause problems. Best way to connect unused sections is to connect them as noninverting buffers, ie, inverting input connected to the output, then tie the noninverting inputs to ground through a 1k resistor.