You do realize that Cody Wyoming is 80 miles from the main loop of Yellowstone? In my opinion, Cody is a fantastic destination of it's own. The Rodeo is great and the Buffalo Bill Historic Center is a Museum Complex that is probably second to none for western history and art. But as a base for Yellowstone, it is a bad choice. Much better to stay in the Park or at one of the gateway cities that actually adjoin the park (West Yellowstone and Gardiner). As for the route, Interstate 25 will be your best bet for no grades. The only pass of note would be Raton pass and though it is fairly high, being an interstate pass the grade is very moderate. Your choice will come in the route into Cody. You can exit the interstate at Casper, take the two lane road to Shoshone and then go through Thermopolis to Greybull and then into Cody. That route has a canyon section but no grades of note. The two routes over the Bighorn mountains are a different story, Buffalo to Ten Sleep to Worland to Greybull has some steep grades and Ranchester to Greybull is steeper. Many RVers drive those two routes, but if you have big concerns about mountain driving, take the other route.