how to shield arduino uno from external mag fields?

of course it is the variation of the mag fields that create problems. I used a 220ohm resistor.