He commented on the pin in a television interview Wednesday and then again on Thursday at a campaign appearance in Independence, Iowa.
Noting the TV interview, he told the campaign crowd, "I said, you know what, I probably haven't worn a flag pin in a very long time. After a while I noticed people wearing a lapel pin and not acting very patriotic."
"My attitude is that I'm less concerned about what you're wearing on your lapel than what's in your heart. You show your patriotism by how you treat your fellow Americans, especially those who serve. You show your patriotism by being true to our values and ideals. That's what we have to lead with is our values and our ideals."
He had been asked about the pin Wednesday in an interview with KCRG-TV in Cedar Rapids.
"The truth is that right after 9/11 I had a pin," Obama said. "Shortly after 9/11, particularly because as we're talking about the Iraq war, that became a substitute for I think true patriotism, which is speaking out on issues that are of importance to our national security."
Obama was campaigning Thursday on the third day of a four-day trip to the early voting state.
At one stop, he called for new restrictions on deployment of National Guard and Reserve troops along with an expansion of benefits for them and their families.
"I will not be a president who extends tours for our Guard units overseas while Americans are stranded on rooftops right here at home," Obama said.
He said he would require "a period of rest and standard of readiness" before troops could be redeployed. He called for the head of the National Guard to be elevated to four-star rank and given a seat among the Joint Chiefs of Staff to reflect the heavy reliance on Guard soldiers and reservists during the Iraq war.
Since 2001, Obama said, more than 580,000 reservists have been activated, a level not seen since World War II.
In making his case, Obama pointed to an Iowa unit in which members learned from family and friends back home that their deployment had been extended. That unit - the 1st Battalion of the 133rd Infantry - recently returned after a 22-month deployment in Iraq.
"When we've got service members who have to find out that their tour has been extended in a phone call home, we're not keeping that trust and we're not keeping this country safe," Obama said.
He also called for increased mental health services, including screening and treatment for post-traumatic stress disorder. He said nearly half of the National Guard troops returning from Iraq and Afghanistan suffer from psychological problems, yet little emphasis is put on treating those disorders.
"We're not providing adequate treatment, screening and benefits," said Obama. "We need more mental health professionals and more training to recognize the signs."
Associated Press Writer Scott McFetridge contributed to this story.
© 2007 The Associated Press