When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Swing by a parts store and have them test your alternator and batteries. Most will do it for free.
Since the light goes out when you are at idle then your alternator could be failing either low voltage when RPMs increase or over voltage which usually means the voltage regulator is dying or dead. If that is the case then get it fixed before it fries your batteries.