Your Miranda rights do not come into play unless the police want to question you while you are in custody. It is likely the officer does not need to use anything you said against you.
Our Fifth Amendment to the United States Constitution guarantees to all people the privilege to be free from compulsory self-incrimination. Since 1966, Miranda v. Arizona has served as the touchstone for the exploration of the scope of that privilege during a period of custodial interrogation. Anything you said may be subject to being suppressed.
The Court in Miranda created right to counsel procedural safeguards to adequately ensure that the accused know their rights and that the police honor them. The Miranda Court recognized that "[a]n individual swept from ... familiar surroundings into police custody, surrounded by antagonistic forces, and subjected to ... techniques of persuasion ... cannot be otherwise than under compulsion to speak."
Online we cannot know what the other details are going on in your case because online we cannot find out those details. You need a lawyer. Check with a lawyer in your locale to discuss more of the details. If needed, use a motion to suppress.
Good luck to you.
NOTE: This answer is made available by the out-of-state lawyer for educational purposes only. By using or participating in this site you understand that there is no attorney client privilege between you and the attorney responding. This site should not be used as a substitute for competent legal advice from a licensed professional attorney that practices in the subject practice discipline and with whom you have an attorney client relationship along with all the privileges that relationship provides. The law changes frequently and varies from jurisdiction to jurisdiction. The information and materials provided are general in nature, and may not apply to a specific factual or legal circumstance described in the question.
Yes what the officer did is legal and is not wrong. I agree with Alan. In many cases, officer do not read Miranda rights because they do not need to use your statements against you.
Miranda seldom comes into play during a traffic stop/investigation but is relevant to a custodial interrogation. In many instances cases of excessive speed will result in the officer charging a reckless, one of the charges will usually get dismissed in the course of a pre-trial with the prosecutor.