It is hard to say because I don’t know what the code is supposed to do. The I/O pin definitions look correct to me, they appear to match the physical connections in the sketch so if the original code worked then yours should as well. Thats about as far as I can say.
Peter