A Buxton man was found to be trying to grow his own cannabis to use for pain relief, a court heard.
Sarah Haslam, prosecuting, said that when police were dealing with Ryan David Parker, 30, for an unrelated matter, a quantity of amphetamine, worth about £20 was found.
A search of his home address, on September 28, found eight small cannabis plants being grown. The defendant was bailed and failed to attend the police station on November 9.
John Bunting, defending ,said Parker had successfully overcome a heroin problem but it had badly damaged a leg vein and he was alleviating the severe pain with cannabis,
He said Parker, who had worked full-time until recently, had at the time of the offences split up with his wife.
Parker, of Burlow Road, was given a 12 month community order with 40 hours ‘unpaid work.
An order was made for the forfeiture and destruction of the drugs. Parker must also pay £85 costs.