The former Stevenage man, who played 103 times for the Shots since joining them in 2011, will move to Spotland on July 1.
Dale boss Keith Hill told the club's official website: "I'm excited by this one.
"As soon as I knew that Peter was interested in coming to Rochdale I jumped on it. He will fit comfortably in our environment, there's a great potential from the player and he's 100% committed.
"He's a good technician, but he can take the length of the pitch out of the opposition with his running skills.
"He's looking forward to the prospect of working for me and the club, and he wants to be successful. It was a very easy decision for me to recruit him."
- Sports & Recreation