You also might want to check the specific statute.
Most states make it a crime to interfere with a peace officer in the performance of their duties.
If a police officer ordered you to do something that had nothing to do with furthering their duties (such as ordering you to stop videotaping a public arrest), then you may not have actually broken any law, despite what police or your friends may say.

