To minimize costs, try to stay in free or lower-cost camprounds, such as city/county parks, state parks, U.S. Forest Service and Bureau of Land Management campgrounds. While not always the case, private campgrounds will usually be the most expensive. Some are insanely expensive (e.g., $40/night), especially in the east. On the flip side, they will usually have the more amenities. The ACA maps will tell you what type each campground is. Also note that you can camp for free on most U.S. forest land. Google "Dispersed camping" for more infomation.
One problem with eating out is that you may get to a distination to find that the only prepared food sources in town are closed on that day, or closed for the day before you arrived. It would be wise to carry something to eat in casde you get shut out.