A Sleaford man was caught with heroin and crack cocaine after his car veered off the road, a court was told.
Greg Bird, 35, was found slumped over the wheel after his vehicle left the A153 near the village of Wilsford.
Lincoln Crown Court heard police were called to the scene just before midnight on January 10 after the accident was reported by members of the public.
Abigail Hill, prosecuting, said: “The driver was recognised by the police.
“He was slumped over the wheel and appeared incapable of driving.”
The car was searched and police found six grams of a white powder in Bird’s front jean pocket which after analysis was confirmed as heroin.
Officers also seized crack cocaine which was discovered in a plastic tub inside the car.
After his arrest Bird gave a prepared statement in which he said all the drugs were for his own use.
Miss Hill said that was accepted by the prosecution after Bird provided evidence that he bought the drugs with his winnings from an online gambling site.
There was also no evidence of drug dealing on his phone and no other drugs were found during a search of his home.
Mark Watson, mitigating, told the court: “This is a man with quite a lot on his plate.
“He had a drugs issue, that is plain, but he has been clean for some time and has been providing negative tests.
“He has managed to stay away from Class A drugs.”
Bird, of Newfield Road, Sleaford, admitted two charges of possessing Class A drugs on January 10, this year.
He was sentenced to a 12 community order with a 15 day rehabilitation requirement and must also pay £130 costs.
Passing sentence, Judge Simon Hirst told Bird: “It appears you are finally getting your act together and getting off drugs.”