Tell the cop, you've been having a sticky switch problem, and were just working the switch, and to see if your bright led dash display is still working (it's been intermittent) after all the rain. You don't know nothing about warning people, you didn't even see a cop.
Plead not guilty. Before court, go to a repair shop and complain about a sticky switch, and take the receipt to court. Stick to your story. Make them prove you were warning people.
Mine the border.
It's been backwards for some time.
Advising perjury?
Perhaps. When the full power and majesty of Government is brought against you (for chickensh!t), I advise to not roll over for them, and to fight back.
A good story at the scene (which is not under oath) may preclude court altogether. If it doesn't and you go to court anyway, you either stick with your story, or stand mute and see how that works out for you.
For the record, in 50 years (and 3 months) with a driver's license, I have plead and paid every violation ticketed for, as I was guilty (and to the best of my recollection, none was for chickensh!t). I twice plead not guilty because I wasn't, and told the truth and was acquitted.